úÎôÞèr      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁNone 047CINFormat Â$ into a short human readable format.EformatAsLogTime $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012"2016-01-23 01:23:45"Format  into a Iso8601 format.ˆNote that this function may overcommit up to 12*2 bytes, depending on sub-second precision. If this is an issue, make a copy with a .EformatAsIso8601 $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012#"2016-11-23T01:23:45.123456789012Z"<formatAsIso8601 $ UTCTime (fromGregorian 2016 1 23) 5025.123"2016-01-23T01:23:45.123Z"8formatAsIso8601 $ UTCTime (fromGregorian 2016 1 23) 5025"2016-01-23T01:23:45Z"à Writes the  YYYY-MM-DD part of timestampÄ.Write time of day, optionally with sub secondsÅÆÇÈÃÄÉÊËÌÍÎÏÐÅÆÇÈÃÄÉÊËÌÍÎÏÐNone-013457;>CILN,2This has everything each log message will contain.(Log message with Builder unerneath; use Ñ to concat in O(1).9Verbosity controls the amount of information (columns) a @ emits during logging.The convention is: - F implies no additional payload information is included in message. - v implies the maximum amount of payload information. - Anything in between is left to the discretion of the developer.Debug messages InformationNormal runtime ConditionsGeneral WarningsGeneral Errors Severe situations!Take immediate action"System is unusable#Application environment, like prod, devel, testing.&ôRepresents a heirarchy of namespaces going from general to specific. For instance: ["processname", "subsystem"]. Note that single-segment namespaces can be created using IsString/OverloadedStrings, so "foo" will result in Namespace ["foo"].*<Ready namespace for emission with dots to join the segments.-"Pack any string-like thing into a #. This will automatically work on Ò, 'ByteString, Ó and any of the lazy variants..Shorthand for -/!Convert any showable type into a .<ÞName of application. This will typically never change. This field gets prepended to the namespace of your individual log messages. For example, if your app is MyApp and you write a log using "logItem" and the namespace  WebServer, the final namespace will be MyApp.WebServer>;Action to fetch the timestamp. You can use something like  AutoUpdate‡ for high volume logs but note that this may cause some output forms to display logs out of order. Alternatively, you could just use Ô.@gScribes are handlers of incoming items. Each registered scribe knows how to push a log item somewhere. Guidelines for writing your own @Scribes should always take a  and .ªSeverity is used to *exclude log messages* that are < the provided Severity. For instance, if the user passes InfoS, DebugS items should be ignored. Katip provides the g utility for this.DVerbosity is used to select keys from the log item's payload. Each HT instance describes what keys should be retained for each Verbosity level. Use the e; utility for extracting the keys that should be permitted.ZThere is no built-in mechanism in katip for telling a scribe that its time to shut down. ‰ merely drops it from the 8>. This means there are 2 ways to handle resources as a scribe: Pass in the resource when the scribe is created. Handle allocation and release of the resource elsewhere. This is what the Handle scribe does.BReturn a finalizing function that tells the scribe to shut down. katip-elasticsearch's  mkEsScribe returns a IO (Scribe, IO ())Ó. The finalizer will flush any queued log messages and shut down gracefully before returning. This can be hooked into your application's shutdown routine to ensure you never miss any log messages on shutdown.Hÿ,Payload objects need instances of this class. LogItem makes it so that you can have very verbose items getting logged with lots of extra fields but under normal circumstances, if your scribe is configured for a lower verbosity level, it will only log a selection of those keys. Furthermore, each @% can be configured with a different  level. You could even use ˆ, ‰, and Šd to at runtime swap out your existing scribes for more verbose debugging scribes if you wanted to.When defining I®, don't redundantly declare the same keys for higher levels of verbosity. Each level of verbosity automatically and recursively contains all keys from the level before it.ICList of keys in the JSON object that should be included in message.J”Katip requires JSON objects to be logged as context. This typeclass provides a default instance which uses ToJSON and produces an empty object if Õÿ results in any type other than object. If you have a type you want to log that produces an Array or Number for example, you'll want to write an explicit instance here. You can trivially add a ToObject instance for something with a ToJSON instance like: instance ToObject FooL0Field selector by verbosity within JSON payload.d*Construct a simple log from any JSON item.e~Constrain payload based on verbosity. Backends should use this to automatically bubble higher verbosity levels to lower ones.f²Convert log item to its JSON representation while trimming its payload based on the desired verbosity. Backends that push JSON messages should use this to obtain their payload.g=Should this item be logged given the user's maximum severity?n>A built-in convenience log payload that won't log anything on „, but will log everything in any other level of verbosity. Intended for easy in-line usage without having to define new log types.Construct using d# and combine multiple tuples using Ñ from Ö.|4A concrete monad you can use to run logging actions.ÿMonads where katip logging actions can be performed. Katip is the most basic logging monad. You will typically use this directly if you either don't want to use namespaces/contexts heavily or if you want to pass in specific contexts and/or namespaces at each log site.2For something more powerful, look at the docs for  KatipContext™, which keeps a namespace and merged context. You can write simple functions that add additional namespacing and merges additional context on the fly.‡0Create a reasonable default InitLogEnv. Uses an  AutoUdate² with the default settings as the timer. If you are concerned about timestamp precision or event ordering in log outputs like ElasticSearch, you should replace the timer with ÔˆaAdd a scribe to the list. All future log calls will go to this scribe in addition to the others.‰„Remove a scribe from the list. All future log calls will no longer use this scribe. If the given scribe doesn't exist, its a no-op.ŠŽUnregister *all* scribes. Logs will go off into space from this point onward until new scribes are added. Note that you could use this with ×N if you're using a Reader based stack to temporarily disable log output. See katipNoLogging for an example.‹Execute | on a log env.ŒiLog with everything, including a source code location. This is very low level and you typically can use “ in its place.5Log with full context, but without any code location.ŽLPerform an action while logging any exceptions that may occur. Inspired by Ø.-> logException () mempty ErrorS (error "foo");Log a message without any payload/context or code location.Lift a location into an Exp.‘_For use when you want to include location in your logs. This will fill the 'Maybe Loc' gap in O of this module, and relies on implicit callstacks when available (GHC > 7.8).“Ù,-tagged logging when using template-haskell. &$(logT) obj mempty InfoS "Hello world"”Ù9-tagged logging using implicit-callstacks when available.JThis function does not require template-haskell as it automatically uses  Shttps://hackage.haskell.org/package/base-4.8.2.0/docs/GHC-Stack.html#v:getCallStackimplicit-callstacksû when the code is compiled using GHC > 7.8. Using an older version of the compiler will result in the emission of a log line without any location information, so be aware of it. Users using GHC <= 7.8 may want to use the template-haskell function “ for maximum compatibility. %logLoc obj mempty InfoS "Hello world"¡  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡%A base namespace for this applicationCurrent run environment (e.g. prod vs. devel)ˆName the scribe‰Name of the scribeŠ‹ŒContextual payload for the log"Specific namespace of the message.Severity of the messageThe log messageŽ Log context NamespaceSeverityMain action being run‘’“”•–—˜™š›œžŸ ¡¢y  !"#$%&'()*+,-./089:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•¡)&'(7*#$% !"+,654321-./0 a`_^]\[ZYXW{UVzyRSTxwvbcOPQutLMNsrJKqpHIoFGCDEnmlkjdef@ABihg89:;<=>?†…„ƒ‚‡ˆ‰Š€¢¡ Ÿžœ|}~›š™‹ŒŽ˜—–‘’“”•i   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢None!"*03457>CILN ¨-Provides a simple transformer that defines a «ÿ instance for a fixed namespace and context. You will typically only use this if you are forced to run in IO but still want to have your log context. This is the slightly more powerful version of KatipT in that it provides KatipContext instead of just Katip. For instance: å threadWithLogging = do le <- getLogEnv ctx <- getKatipContext ns <- getKatipNamespace forkIO $ runKatipContextT le ctx ns $ do $(logTM) InfoS "Look, I can log in IO and retain context!" doOtherStuff «ŽA monadic context that has an inherant way to get logging context and namespace. Examples include a web application monad or database monad.®:Heterogeneous list of log contexts that provides a smart  LogContextÿ instance for combining multiple payload policies. This is critical for log contexts deep down in a stack to be able to inject their own context without worrying about other context that has already been set. Also note that contexts are treated as a sequence and Ú¼ will be appended to the right hand side of the sequence. If there are conflicting keys in the contexts, the /right side will take precedence/, which is counter to how monoid works for Map and HashMap>, so bear that in mind. The reasoning is that if the user is  sequentially adding contexts to the right side of the sequence, on conflict the intent is to overwrite with the newer value (i.e. the rightmost value).‹Additional note: you should not mappend LogContexts in any sort of infinite loop, as it retains all data, so that would be a memory leak.¯A wrapper around a log context that erases type information so that contexts from multiple layers can be combined intelligently.°bLift a log context into the generic wrapper so that it can combine with the existing log context.±iLog with everything, including a source code location. This is very low level and you typically can use ³< in its place. Automaticallysupplies payload and namespace.²dLog with full context, but without any code location. Automatically supplies payload and namespace.³Ù[-tagged logging when using template-haskell. Automatically supplies payload and namespace. $(logTM) InfoS "Hello world"´Ù[-tagged logging when using template-haskell. Automatically supplies payload and namespace.Same consideration as ” applies.JThis function does not require template-haskell as it automatically uses  Shttps://hackage.haskell.org/package/base-4.8.2.0/docs/GHC-Stack.html#v:getCallStackimplicit-callstacksû when the code is compiled using GHC > 7.8. Using an older version of the compiler will result in the emission of a log line without any location information, so be aware of it. Users using GHC <= 7.8 may want to use the template-haskell function ³ for maximum compatibility. logLocM InfoS "Hello world"µLPerform an action while logging any exceptions that may occur. Inspired by Ø.$> error "foo" `logExceptionM` ErrorS·Append a namespace segment to the current namespace for the given monadic action, then restore the previous state afterwards.¸ÈAppend some context to the current context for the given monadic action, then restore the previous state afterwards. Important note: be careful using this in a loop. If you're using something like Û or Üc that does explicit sharing to avoid a memory leak, youll be fine as it will *sequence* calls to ·ÿ, so each loop will get the same context added. If you instead roll your own recursion and you're recursing in the action you provide, you'll instead accumulate tons of redundant contexts and even if they all merge on log, they are stored in a sequence and will leak memory.¹PDisable all scribes for the given monadic action, then restore them afterwards..£¤¥¦§¨©ª«¬­®Ý¯Þ°±²Severity of the messageThe log message³´µMain action to runSeverity¶·¸¹ßàáâãäåæçèéêëìíîïðñò󣤥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹²³´±µ«¬­¯®°¨©ª¶·¸¹£¤¥¦§$£¤¥¦§¨©ª«¬­®ݯÞ°±²³´µ¶·¸¹ßàáâãäåæçèéêëìíîïðñòóNone 047CIN»0Whether to use color control chars in log output¼Color if output is a terminal¿“Logs to a file handle such as stdout, stderr, or a file. Contexts and other information will be flattened out into bracketed fields. For example: ÿü[2016-05-11 21:01:15][MyApp][Info][myhost.example.com][1724][ThreadId 1154][main:Helpers.Logging Helpers/Logging.hs:32:7] Started [2016-05-11 21:01:15][MyApp.confrabulation][Debug][myhost.example.com][1724][ThreadId 1154][confrab_factor:42.0][main:Helpers.Logging Helpers/Logging.hs:41:9] Confrabulating widgets, with extra namespace and context [2016-05-11 21:01:15][MyApp][Info][myhost.example.com][1724][ThreadId 1154][main:Helpers.Logging Helpers/Logging.hs:43:7] Namespace and context are back to normalÁGAn implicit environment to enable logging directly ouf of the IO monad.º»¼½¾¿ÀÁº»¼½¾¿ÀÁ½¾º»¼¿ÀÁº»¼½¾¿ÀÁNone 047CINv  !"#$%&'(+,-./89:;<=>?@ABCHIJKLMNWXYZ[\]^_`adefg|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ“¨«¬­®¯°±²³µ¶·¸¹º»¼¿v&'(#$% !"+,JKHI LMN@AB89:;<=>?CdWX_`Y^][a\Zƒ„‚†…|}~‹‡ˆ‰Š-./€“ŒŽ«¬­²³±µ¯®°¿º»¼gef¨¶·¸¹ô       !"#$%&'(()**+,-./0123456789:;;<=>?@ABBCDDEFFGHIJKLMNNOPPQRRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒºÓÔÕÖ×ÍÎØÙÚÛÜÝÞßàáÍâÌÍãäÍã妧æçèéêëìíîïðñòóôõö÷øùúû15qMeUYNrkG8yfmr2JGLjYKatip.Format.Time Katip.Core Katip.MonadicKatip.Scribes.Handle Data.TextcopyKatipformatAsLogTimeformatAsIso8601Item_itemApp_itemEnv _itemSeverity _itemThread _itemHost _itemProcess _itemPayload _itemMessage _itemTime_itemNamespace_itemLoc ThreadIdTextgetThreadIdTextLogStrunLogStr VerbosityV0V1V2V3SeverityDebugSInfoSNoticeSWarningSErrorS CriticalSAlertS EmergencyS EnvironmentgetEnvironment Namespace unNamespacereadMay intercalateNsrenderSeveritytextToSeveritylogStrlsshowLSmkThreadIdText$fFromJSONLogStr$fMonoidLogStr$fSemigroupLogStr$fIsStringLogStr$fFromJSONSeverity$fToJSONSeverity$fIsStringNamespaceLogEnv _logEnvHost _logEnvPid _logEnvApp _logEnvEnv _logEnvTimer_logEnvScribesScribeliPushSimpleLogPayloadunSimpleLogPayload AnyLogPayloadLogItem payloadKeysToObjecttoObjectPayloadSelectionAllKeysSomeKeys ProcessIDJsgetProcessIDJsLocJsgetLocJsLocShowitemAppitemEnvitemHostitemLoc itemMessage itemNamespace itemPayload itemProcess itemSeverity itemThreaditemTimeprocessIDToTexttextToProcessIDsl payloadObjectitemJson permitItem$fMonoidScribe$fSemigroupScribe$fMonoidSimpleLogPayload$fSemigroupSimpleLogPayload$fLogItemSimpleLogPayload$fToObjectSimpleLogPayload$fToJSONSimpleLogPayload $fLogItem()$fToObjectHashMap $fToObject()$fMonoidPayloadSelection$fSemigroupPayloadSelection$fFromJSONProcessIDJs$fToJSONProcessIDJs$fFromJSONItem$fFromJSONLocJs $fToJSONLocJs $fToJSONItem $fShowLocShow $fShowItemKatipTunKatipT getLogEnv logEnvApp logEnvEnv logEnvHost logEnvPid logEnvScribes logEnvTimer initLogEnvregisterScribeunregisterScribe clearScribes runKatipTlogItemlogF logExceptionlogMsgliftLocgetLocgetLocTHlogTlogLoclocationToString$fLiftSeverity$fLiftVerbosity$fLiftNamespace$fMonadBaseControlbKatipT$fMonadTransControlKatipT $fKatipKatipT$fKatipResourceT$fKatipWriterT $fKatipStateT $fKatipMaybeT$fKatipExceptT$fKatipEitherT$fKatipReaderTKatipContextTState ltsLogEnv ltsContext ltsNamespace KatipContextTunKatipContextT KatipContextgetKatipContextgetKatipNamespace LogContexts AnyLogContext liftPayloadlogItemMlogFMlogTMlogLocM logExceptionMrunKatipContextTkatipAddNamespacekatipAddContextkatipNoLogging ColorStrategyColorLogColorIfTerminalbracketsgetKeysmkHandleScribe formatItem _ioLogEnvtime_FTheb6LSxyX1UABIbBXRfnData.Time.Clock.UTCUTCTimewriteDaywriteTimeOfDay TimeOfDay64TODTwriteFracSeconds writeDigit6 writeDigit3 writeTrunc6 writeTrunc3 twoDigitsdigitdiffTimeOfDay648oqWibumc027PwJt2VRfp0Data.Semigroup<>baseGHC.BaseStringBKb3DGJ0RPHAf8HuHkpsM1Data.Text.InternalTextData.Time.ClockgetCurrentTimeFjEAWAIWmZUlNjfXHzc2eData.Aeson.Types.ToJSONtoJSONMonoidtrans_GZTjP9K5WFq01xC9BAGQpFControl.Monad.Trans.Readerlocal7Qn3Y4kVyibCkxINIIkz7ZControl.Monad.Catch onExceptiontemplate-haskellLanguage.Haskell.TH.SyntaxLoc Data.Monoid Control.Monadforever replicateM_$fKatipContextKatipContextT$fKatipKatipContextT$fMonadReaderrKatipContextT $fMonadBaseControlbKatipContextT $fMonadTransControlKatipContextT$fKatipContextRWST$fKatipContextRWST0$fKatipContextWriterT$fKatipContextWriterT0$fKatipContextExceptT$fKatipContextStateT$fKatipContextStateT0$fKatipContextResourceT$fKatipContextReaderT$fKatipContextListT$fKatipContextEitherT$fKatipContextMaybeT$fKatipContextIdentityT$fLogItemLogContexts$fToObjectLogContexts$fToJSONLogContexts