on master help sign in
Merge branch 'master' of github.com:Soostone/katip
commitdc2f9351d7f74e0ca2ba6c4190bcb1ee22a273eb authorMichael Xavier <michael@michaelxavier.net> dateMon 9 Nov 2015, 11:27 (11 years ago) parent0893e3698a86a4
3 files changed+10−3
katip-elasticsearch/katip-elasticsearch.cabal+2−2 katip/katip.cabal+1−1 katip/src/Katip/Core.hs+7
katip-elasticsearch/katip-elasticsearch.cabal+2−2
@@ -20,10 +20,10 @@ library
2020 build-depends:
2121 base >=4.6 && <4.9
2222 , katip
23− , bloodhound >= 0.7.0.1 && < 0.9
23+ , bloodhound >= 0.7.0.1 && < 0.10
2424 , random >= 1.0 && < 1.2
2525 , uuid >= 1.3 && < 1.4
26− , aeson >=0.6 && <0.9
26+ , aeson >=0.6 && <0.11
2727 , stm >= 2.4.3 && < 2.5
2828 , stm-chans >= 3.0.0.2 && < 3.1
2929 , async >= 2.0.1.0 && < 2.1
katip/katip.cabal+1−1
@@ -34,7 +34,7 @@ library
3434 OverloadedStrings
3535
3636 build-depends: base >=4.5 && <4.9
37− , aeson >=0.6 && <0.9
37+ , aeson >=0.6 && <0.11
3838 , auto-update >= 0.1 && < 0.2
3939 , bytestring >= 0.9 && < 0.11
4040 , containers >=0.4 && <0.6
katip/src/Katip/Core.hs+7
@@ -428,12 +428,19 @@ data LogEnv = LogEnv {
428428 , _logEnvNs :: Namespace
429429 , _logEnvEnv :: Environment
430430 , _logEnvTimer :: IO UTCTime
431+ -- ^ Action to fetch the timestamp. You can use something like
432+ -- 'AutoUpdate' for high volume logs but note that this may cause
433+ -- some output forms to display logs out of order.
431434 , _logEnvScribes :: M.Map Text Scribe
432435 }
433436makeLenses ''LogEnv
434437
435438
436439-------------------------------------------------------------------------------
440+-- | Create a reasonable default InitLogEnv. Uses an 'AutoUdate' with
441+-- the default settings as the timer. If you are concerned about
442+-- timestamp precision or event ordering in log outputs like
443+-- ElasticSearch, you should replace the timer with 'getCurrentTime'
437444initLogEnv
438445 :: Namespace
439446 -- ^ A base namespace for this application