!N:Y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXNone"#&'478=>?@AEHMSVXn1katip2This has everything each log message will contain.katip)Log message with Builder underneath; use Y to concat in O(1).katip9Verbosity controls the amount of information (columns) a o 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.katipDebug messageskatip InformationkatipNormal runtime ConditionskatipGeneral WarningskatipGeneral ErrorskatipSevere situationskatipTake immediate action katipSystem is unusable!katipApplication environment, like prod, devel, testing.$katipRepresents 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"].(katip<Ready namespace for emission with dots to join the segments.+katip"Pack any string-like thing into a #. This will automatically work on Z,  ByteString, [ and any of the lazy variants.,katipShorthand for +-katip!Convert any showable type into a .dkatipName 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.WebServerfkatip;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 \.okatipgScribes are handlers of incoming items. Each registered scribe knows how to push a log item somewhere. Guidelines for writing your own oScribes 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  utility for this.DVerbosity is used to select keys from the log item's payload. Each xT instance describes what keys should be retained for each Verbosity level. Use the ; 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 `>. 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 an 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.rkatipProvide a *blocking* finalizer to call when your scribe is removed. If this is not relevant to your scribe, return () is fine.xkatip,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 o% 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 y, 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.ykatipCList of keys in the JSON object that should be included in message.zkatipKatip 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 Foo|katip0Field selector by verbosity within JSON payload.katip*Construct a simple log from any JSON item.katip~Constrain payload based on verbosity. Backends should use this to automatically bubble higher verbosity levels to lower ones.katipConvert 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.katip=Should this item be logged given the user's maximum severity?katip>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 # and combine multiple tuples using Y from ^.katip0Create a reasonable default InitLogEnv. Uses an  AutoUdate~ which updates the timer every 1ms. If you need even more timestamp precision at the cost of performance, consider setting f with \.katipaAdd a scribe to the list. All future log calls will go to this scribe in addition to the others.katipA concrete monad you can use to run logging actions. Use this if you prefer an explicit monad transformer stack and adding layers as opposed to implementing  for your monad.katipMonads 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.} was added to allow for lexically-scoped modifications of the log env that are reverted when the supplied monad completes. ;, for example, uses this to temporarily pause log outputs.katip7Reasonable defaults for a scribe. Buffer size of 4096.katipRemove a scribe from the environment. This does *not* finalize the scribe. This mainly only makes sense to use with something like MonadReader's localF function to temporarily disavow a single logger for a block of code.katipZUnregister *all* scribes. Note that this is *not* for closing or finalizing scribes, use R for that. This mainly only makes sense to use with something like MonadReader's localB function to temporarily disavow any loggers for a block of code.katip Finalize a scribe. The scribe is removed from the environment, its finalizer is called and it can never be written to again. Note that this will throw any exceptions yoru finalizer will throw, and that LogEnv is immutable, so it will not be removed in that case.katip+Call this at the end of your program. This is a blocking call that stop writing to a scribe's queue, waits for the queue to empty, finalizes each scribe in the log environment and then removes it. Finalizers are all run even if one of them throws, but the exception will be re-thrown at the end.katipExecute  on a log env.katipjDisable all scribes for the given monadic action, then restore them afterwards. Works in any Katip monad.katipiLog with everything, including a source code location. This is very low level and you typically can use  in its place.katip5Log with full context, but without any code location.katipLPerform an action while logging any exceptions that may occur. Inspired by _.-> logException () mempty ErrorS (error "foo")katip;Log a message without any payload/context or code location.katipLift a location into an Exp.katip_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).katip`,-tagged logging when using template-haskell. &$(logT) obj mempty InfoS "Hello world"katip`-tagged logging using  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"katip%A base namespace for this applicationkatipCurrent run environment (e.g. prod vs. devel)katipName the scribekatipName of the scribekatipName of the scribekatip Did we write?katipContextual payload for the logkatip"Specific namespace of the message.katipSeverity of the messagekatipThe log messagekatip Log contextkatip NamespacekatipSeveritykatipMain action being run   !"#$%&'()*+,-.`agfedcbhjiklnmoprqstuvwxyz{|~}Ռ'$%&(!"# )*+,- . |~}z{xyvwstuoprqklnmhji`agfedcbNone "#7>@AMSXMkatipFormat a$ into a short human readable format.EformatAsLogTime $ UTCTime (fromGregorian 2016 1 23) 5025.123456789012"2016-01-23 01:23:45"katipFormat a 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"bkatip Writes the  YYYY-MM-DD part of timestampckatip.Write time of day, optionally with sub secondsNone"#&'17=>?@AHMSVXkatip-Provides a simple transformer that defines a 8 instance for a fixed namespace and context. Just like i, you should use this if you prefer an explicit transformer stack and don't want to (or cannot) define  for your monad . 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 katipA monadic context that has an inherant way to get logging context and namespace. Examples include a web application monad or database monad. The local variants are just like local< from Reader and indeed you can easily implement them with localB if you happen to be using a Reader in your monad. These give us   and   that works with *any* Z, as opposed to making users have to implement these functions on their own in each app.katipXTemporarily modify the current context for the duration of the supplied monad. Used in  katipZTemporarily modify the current namespace for the duration of the supplied monad. Used in  katip: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 Y 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.katipA wrapper around a log context that erases type information so that contexts from multiple layers can be combined intelligently.katipbLift a log context into the generic wrapper so that it can combine with the existing log context.katipiLog with everything, including a source code location. This is very low level and you typically can use = in its place. Automatically supplies payload and namespace.katipdLog with full context, but without any code location. Automatically supplies payload and namespace.katip`[-tagged logging when using template-haskell. Automatically supplies payload and namespace. $(logTM) InfoS "Hello world"katip`-tagged logging when using dG implicit-callstacks>. Automatically supplies payload and namespace.Same consideration as  applies.5Location will be logged from the module that invokes  so be aware that wrapping & will make location reporting useless.This function does not require template-haskell. Using GHC <= 7.8 will result in the emission of a log line without any location information. Users using GHC <= 7.8 may want to use the template-haskell function  for maximum compatibility. logLocM InfoS "Hello world" katipLPerform an action while logging any exceptions that may occur. Inspired by _.$> error "foo" `logExceptionM` ErrorS katipAppend a namespace segment to the current namespace for the given monadic action, then restore the previous state afterwards. Works with anything implementing KatipContext. katipAppend 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 e or fc that does explicit sharing to avoid a memory leak, youll be fine as it will *sequence* calls to  F, 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. Works with anything implementing KatipContext. katipConvenience function for when you have to integrate with a third party API that takes a generic logging function as an argument.katipSeverity of the messagekatipThe log message katipMain action to runkatipSeverity          None "#7>@AMSX5 Ikatip#A custom ItemFormatter for logging  s. Takes a g- indicating whether to colorize the output,  of output, and an  to format.See S and T for examples.Kkatip0Whether to use color control chars in log outputLkatipColor if output is a terminalOkatipLogs 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 normalReturns the newly-created o;. The finalizer flushes the handle. Handle mode is set to h automatically.PkatipILogs to a file handle such as stdout, stderr, or a file. Takes a custom I that can be used to format  as needed.Returns the newly-created o;. The finalizer flushes the handle. Handle mode is set to h automatically.QkatipA specialization of O that takes a i instead of a j-. It is responsible for opening the file in k$ and will close the file handle on 'closeScribe'/'closeScribes',. Does not do log coloring. Sets handle to h mode.SkatipA traditional  bracketedf log format. 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 normalTkatipLogs items as JSON. This can be useful in circumstances where you already have infrastructure that is expecting JSON to be logged to a standard stream or file. For example: {"at":"2018-10-02T21:50:30.4523848Z","env":"production","ns":["MyApp"],"data":{},"app":["MyApp"],"msg":"Started","pid":"10456","loc":{"loc_col":9,"loc_pkg":"main","loc_mod":"Helpers.Logging","loc_fn":"Helpers\\Logging.hs","loc_ln":44},"host":"myhost.example.com","sev":"Info","thread":"ThreadId 139"} {"at":"2018-10-02T21:50:30.4523848Z","env":"production","ns":["MyApp","confrabulation"],"data":{"confrab_factor":42},"app":["MyApp"],"msg":"Confrabulating widgets, with extra namespace and context","pid":"10456","loc":{"loc_col":11,"loc_pkg":"main","loc_mod":"Helpers.Logging","loc_fn":"Helpers\\Logging.hs","loc_ln":53},"host":"myhost.example.com","sev":"Debug","thread":"ThreadId 139"} {"at":"2018-10-02T21:50:30.4523848Z","env":"production","ns":["MyApp"],"data":{},"app":["MyApp"],"msg":"Namespace and context are back to normal","pid":"10456","loc":{"loc_col":9,"loc_pkg":"main","loc_mod":"Helpers.Logging","loc_fn":"Helpers\\Logging.hs","loc_ln":55},"host":"myhost.example.com","sev":"Info","thread":"ThreadId 139"}UkatipColor a text message based on . * and more severe errors are colored red, N is colored yellow, and all other messages are rendered in the default color.VkatipProvides a simple log environment with 1 scribe going to stdout. This is a decent example of how to build a LogEnv and is best for scripts that just need a quick, reasonable set up to log to stdout.IJLKMNOPQRSTUVMNJLKOPQIRSTUV None "#7>@AMSX6  !"#$%&)*+,-`abcdefgopqrsxyz{|}~    IJKLOPQST$%&!"# )*z{xy |}~opqr`abcdefgs+,-   OPQJKLIST l      !"#$%&'(()**+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeefghijklmnoopqrrstuuvwwxyz{|}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRPQSTUVWXYZ[\PQ]^_`abcWdefgPhiPjkPjlZmnPopPqrPosPtuv$katip-0.7.0.0-8vtyD2S4p373EumEBTfY7a Katip.CoreKatip.Format.Time Katip.MonadicKatip.Scribes.HandleGHCStack Data.TextcopyKatipItem_itemApp_itemEnv _itemSeverity _itemThread _itemHost _itemProcess _itemPayload _itemMessage _itemTime_itemNamespace_itemLoc ThreadIdTextgetThreadIdTextLogStrunLogStr VerbosityV0V1V2V3SeverityDebugSInfoSNoticeSWarningSErrorS CriticalSAlertS EmergencyS EnvironmentgetEnvironment Namespace unNamespacereadMay intercalateNsrenderSeveritytextToSeveritylogStrlsshowLSmkThreadIdText$fIsStringNamespace$fFromJSONSeverity$fToJSONSeverity$fFromJSONVerbosity$fToJSONVerbosity$fFromJSONLogStr$fMonoidLogStr$fSemigroupLogStr$fIsStringLogStr $fEqNamespace$fShowNamespace$fReadNamespace$fOrdNamespace$fGenericNamespace$fToJSONNamespace$fFromJSONNamespace$fSemigroupNamespace$fMonoidNamespace$fEqEnvironment$fShowEnvironment$fReadEnvironment$fOrdEnvironment$fGenericEnvironment$fToJSONEnvironment$fFromJSONEnvironment$fIsStringEnvironment $fEqSeverity $fOrdSeverity$fShowSeverity$fReadSeverity$fGenericSeverity$fEnumSeverity$fBoundedSeverity $fEqVerbosity$fOrdVerbosity$fShowVerbosity$fReadVerbosity$fGenericVerbosity$fEnumVerbosity$fGenericLogStr $fShowLogStr $fEqLogStr$fToJSONThreadIdText$fFromJSONThreadIdText$fShowThreadIdText$fEqThreadIdText$fOrdThreadIdText $fGenericItem $fFunctorItemLogEnv _logEnvHost _logEnvPid _logEnvApp _logEnvEnv _logEnvTimer_logEnvScribes WorkerMessageNewItem PoisonPill ScribeHandleshScribeshChanScribeliPushscribeFinalizerSimpleLogPayloadunSimpleLogPayload AnyLogPayloadLogItem payloadKeysToObjecttoObjectPayloadSelectionAllKeysSomeKeys ProcessIDJsgetProcessIDJsLocJsgetLocJsLocShowitemAppitemEnvitemHostitemLoc itemMessage itemNamespace itemPayload itemProcess itemSeverity itemThreaditemTimeprocessIDToTexttextToProcessIDsl payloadObjectitemJson permitItem$fEqItem $fShowLocShow $fShowItem$fFromJSONLocJs $fToJSONLocJs$fFromJSONProcessIDJs$fToJSONProcessIDJs$fFromJSONItem $fToJSONItem$fMonoidPayloadSelection$fSemigroupPayloadSelection$fToObjectHashMap $fToObject() $fLogItem()$fMonoidSimpleLogPayload$fSemigroupSimpleLogPayload$fLogItemSimpleLogPayload$fToObjectSimpleLogPayload$fToJSONSimpleLogPayload$fMonoidScribe$fSemigroupScribe$fShowPayloadSelection$fEqPayloadSelectionScribeSettings_scribeBufferSize logEnvApp logEnvEnv logEnvHost logEnvPid logEnvScribes logEnvTimer initLogEnvregisterScribespawnScribeWorker$fShowScribeSettings$fEqScribeSettingsKatipTunKatipT getLogEnv localLogEnvscribeBufferSizedefaultScribeSettingsunregisterScribe clearScribes closeScribe closeScribes runKatipTkatipNoLogginglogItemtryWriteTBQueuelogF logExceptionlogMsgliftLocgetLocgetLocTHlogTlogLoclocationToString$fLiftSeverity$fLiftVerbosity$fLiftNamespace$fKatipResourceT$fKatipWriterT$fKatipWriterT0 $fKatipStateT $fKatipRWST $fKatipRWST0$fKatipStateT0 $fKatipMaybeT$fKatipExceptT$fKatipReaderT$fMonadUnliftIOKatipT$fMonadBaseControlbKatipT$fMonadTransControlKatipT $fKatipKatipT$fFunctorKatipT$fApplicativeKatipT $fMonadKatipT$fMonadIOKatipT$fMonadMaskKatipT$fMonadCatchKatipT$fMonadThrowKatipT$fMonadTransKatipT$fMonadBaseKatipTformatAsLogTimeformatAsIso8601 NoLoggingT runNoLoggingTKatipContextTState ltsLogEnv ltsContext ltsNamespace KatipContextTunKatipContextT KatipContextgetKatipContextlocalKatipContextgetKatipNamespacelocalKatipNamespace LogContexts AnyLogContext liftPayloadlogItemMlogFMlogTMlogLocM logExceptionMrunKatipContextTkatipAddNamespacekatipAddContext askLoggerIO$fLogItemLogContexts$fToObjectLogContexts$fToJSONLogContexts$fKatipContextRWST$fKatipContextRWST0$fKatipContextWriterT$fKatipContextWriterT0$fKatipContextExceptT$fKatipContextStateT$fKatipContextStateT0$fKatipContextResourceT$fKatipContextReaderT$fKatipContextMaybeT$fKatipContextIdentityT$fMonadUnliftIOKatipContextT$fKatipContextKatipContextT$fKatipKatipContextT$fMonadReaderrKatipContextT $fMonadBaseControlbKatipContextT $fMonadTransControlKatipContextT$fKatipContextNoLoggingT$fKatipNoLoggingT$fMonadUnliftIONoLoggingT$fMonadBaseControlbNoLoggingT$fMonadTransControlNoLoggingT$fMonadTransNoLoggingT$fMonoidLogContexts$fSemigroupLogContexts$fFunctorKatipContextT$fApplicativeKatipContextT$fMonadKatipContextT$fMonadIOKatipContextT$fMonadThrowKatipContextT$fMonadCatchKatipContextT$fMonadMaskKatipContextT$fMonadBaseKatipContextT$fMonadStateKatipContextT$fMonadWriterKatipContextT$fMonadErrorKatipContextT$fMonadPlusKatipContextT$fAlternativeKatipContextT$fMonadFixKatipContextT$fMonadTransKatipContextT$fFunctorNoLoggingT$fApplicativeNoLoggingT$fMonadNoLoggingT$fMonadIONoLoggingT$fMonadThrowNoLoggingT$fMonadCatchNoLoggingT$fMonadMaskNoLoggingT$fMonadBaseNoLoggingT$fMonadStateNoLoggingT$fMonadWriterNoLoggingT$fMonadErrorNoLoggingT$fMonadPlusNoLoggingT$fAlternativeNoLoggingT$fMonadFixNoLoggingT$fMonadReaderNoLoggingT$fKatipContextKatipT ItemFormatter ColorStrategyColorLogColorIfTerminalbracketsgetKeysmkHandleScribemkHandleScribeWithFormatter mkFileScribe formatItem bracketFormat jsonFormatcolorBySeverityioLogEnv$fShowColorStrategy$fEqColorStrategybaseGHC.Base<>String text-1.2.3.1Data.Text.InternalText time-1.8.0.2Data.Time.Clock.POSIXgetCurrentTime$aeson-1.4.1.0-KxvdZoLxCEkDrj3Txkoc5lData.Aeson.Types.ToJSONtoJSONMonoid.safe-exceptions-0.1.7.0-JcPUEwlMmOs9YDuUMVaSqgControl.Exception.Safe onExceptiontemplate-haskellLanguage.Haskell.TH.SyntaxLoc Data.Time.Clock.Internal.UTCTimeUTCTimewriteDaywriteTimeOfDayGHC.Stack.Types getCallStack Control.Monadforever replicateM_Data.Aeson.Types.InternalValueGHC.IO.Handle.Types LineBufferingGHC.IOFilePathHandle GHC.IO.IOMode AppendMode