śĪ!„Ž}$P      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO None "#%+06KNV]i ŗco-logAction that prints  ByteString to stdout. co-logAction that prints  ByteString to stderr. co-logAction that prints  ByteString to P. co-logAction that prints  ByteString to file. See withLogStringFile for details. co-logAction that prints Text to stdout. co-logAction that prints Text to stderr. co-logAction that prints Text to P. co-logAction that prints Text to file. See withLogStringFile for details. None"#%+06KNV]iĶco-logHWrapper for the background thread that may receive messages to process. co-log Background Q. co-log)Method for communication with the thread. co-logjA wrapper type that carries capacity. The internal type may be differrent for the different GHC versions.  None "#%+06KNV]i;™co-log„An exception safe way to create background logger. This method will fork a thread that will run 'shared worker', see schema above.Capacityg - provides a backpressure mechanism and tells how many messages in flight are allowed. In most cases  will work well. See  for more details. LogAction¬ - provides a logger action, this action does not have access to the application state or thread info, so you should only pass methods that serialize and dump data there. =import qualified Data.Aeson as Aeson main :: IO () main =   (Aeson.encode ` ` logger) $   $ do  0 "Starting application..." where logger =   "/var/log/myapp/log" co-logDefault capacity size, (4096)co-logStop background logger thread.tThe thread is blocked until background thread will finish processing all messages that were written in the channel.co-log%Creates background logger with given Capacity , takes a R) that should describe how to write logs.capacity’C - parameter tells how many in flight messages are allowed, if that value is reached then user's thread that emits logs will be blocked until any message will be written. Usually if value should be chosen reasonably high and if this value is reached it means that the application environment experience severe problems.N.B. The Rq will be run in the background thread so that logger should not add any thread specific context to the message.N.B.ž On exit, even in case of exception thread will dump all values that are in the queue. But it will stop doing that in case if another exception will happen.co-log‘Convert a given 'BackgroundWorker msg' into a 'LogAction msg' that will send log message to the background thread, without blocking the thread.HIf logger dies for any reason then thread that emits logs will receive BlockedIndefinitelyOnSTM exception.You can extend result worker with all functionality available with co-log. This logger will have an access to the thread state.co-log…Create a background worker with a given capacity. If capacity is reached, then the thread that tries to write logs will be blocked.!This method is more generic than Œ but it's less effective, as you have to pass entire closure to be run and that leads to extra memory usage and indirect calls happening.œWhen closed it will dump all pending messages, unless another asynchronous exception will arrive, or synchronous exception will happen during the logging.co-logæRun logger action asynchronously in the worker thread. Logger is executed in the other thread entirely, so if logger takes any thread related context it will be read from the other thread.    None"#%+06KNV]i<‡None"#%+.06KNV]iL³co-lognewtype wrapper S that keeps R in its context.co-log*Perform logging action with given message msg5. This function works for monads that have access to R.$You can use this function like this:  example ::  env T m => m () example = do  "First message..."  "Second message..." co-logLogs multiple messages.co-logSPerforms given monadic logging action by applying function to every logging record. app ::  env T m => m () app =  (cmap ("app:" ++)) $ do  "First message..."  "Second message..." !co-log Runner for E monad. Let's consider one simple example of monadic action you have: app ::  env T m => m () app = do  "Starting application..."  (cmap ("app:" ++)) $ do  "Application started."  "Application finished." 6You can use the following way of running such example: ! (R U) app And you will see this output: KStarting application... app:Application started. app:Application finished.  !  !None"#%&'+-06;<=>?FKNTV]cie (co-logContains additional data to -% to display more verbose information.)co-logEDepedent map from type level strings to the corresponding types. See ,% for mapping between names and types.*co-lognewtype5 wrapper. Stores monadic ability to extract value of ,.Implementation detail: this exotic writing of *P is required in order to use it nicer with type applications. So users can write $MessageField @"threadId" myThreadId  instead of  MessageField _ "threadId" myThreadId Simpler version of this newtype: gnewtype MessageField m fieldName = MessageField { unMesssageField :: m (FieldType fieldName) } ,co-log…Open type family that maps some user defined tags (type names) to actual types. The type family is open so you can add new instances.-co-logConsist of the message V level and the message itself.2co-logLogs the message with given V.3co-logLogs the message with W severity.4co-logLogs the message with X severity.5co-logLogs the message with Y severity.6co-logLogs the message with Z severity.7co-logLogs [ message.8co-log Prettifies - type.\co-log$Prints severity in different colours:co-log5Default message map that contains actions to extract Q and ]#. Basically, the following mapping: 6"threadId" -> myThreadId "utcTime" -> getCurrentTime ;co-logFormats ( in the following way: .[Severity] [Time] [SourceLocation] [ThreadId]  Textmessage <co-logAllows to extend basic -) type with given dependent map of fields.()*+,-./0123456789:;<-./0192345678,*+):(;<None "#%+06KNV]ikń>co-log? specialized to ^?co-log0Pure monad transformer for logging. Can log any msgH messages. Allows to log messages by storing them in the internal state.Bco-logReturns result value of ? and list of logged messages.Cco-logReturns result value of > and list of logged messages.Dco-logR that prints msg, by appending it to the end of the sequence.>?@ABCD?@AB>CDNone "#%+06KNV]izęMco-log7Logger rotation action. Takes name of the logging file file.foo'. Always writes new logs to file named file.foo" (given file name, also called as hot log).VIf the size of the file exceeds given limit for file sizes then this action renames file.foo to file.foo.(n + 1) (where n) is the number of latest renamed file).`If the number of files on the filesystem is bigger than the files number limit then the given FilePath -> IO ()I action is called on the oldest file. As simple solution, you can pass  removeFileq function to delete old files but you can also pass some archiving function if you don't want to lose old logs.Mco-logMax allowed file size in bytesco-log#Max allowed number of files to haveco-logFile path to logco-log What to do with old files; pass  removeFile here for deletionco-log!Action that writes to file handleco-logContinuation actionJKLMJKLMNone "#%+06KNV]i{¤__`abcVWXYZdefghijklmnopqrstuvwxyz{|}~€‚ƒ„R…† !()*+,-./0123456789:;<>?@ABCDJKLM‡ !"#$%&''( )*+ ,-./012344566789:;<=>?@ABCDEFGGHIJKLMNOPQRSTUVWXYWZ[\ ]^_`WabWcd\ef\eg\eh\ei\ejWklmnopWqr\es\et\eu\ev\ew\xy\xz\x{\x|\x}\x~\x\x€\x\‚ƒ\‚„\‚…\‚†\ ‡\ ˆ\ ‰\ Š\ ‹\ Œ\ \ Ž\ \ \ ‘\ ’\ “\ ”\ •\ \ –\ —\ ˜\ ™\ ]\ š›co-log-0.2.0-inplace Colog.ActionsColog.Concurrent.InternalColog.Concurrent Colog.Contra Colog.Monad Colog.Message Colog.PureColog.RotationColog.Core.Actioncmap usingLoggerTlogMsg Colog.ActionwithLogByteStringFileCologlogByteStringStdoutlogByteStringStderrlogByteStringHandle logTextStdout logTextStderr logTextHandlewithLogTextFileBackgroundWorkerbackgroundWorkerThreadIdbackgroundWorkerWritebackgroundWorkerIsAliveCapacitywithBackgroundLogger defCapacitykillBackgroundLoggerforkBackgroundLoggerconvertToLogActionmkBackgroundThreadrunInBackgroundThread$fDecidableLogAction$fDivisibleLogAction$fContravariantLogActionWithLogLoggerT runLoggerTlogMsgswithLog liftLogAction$fMonadTransLoggerT$fFunctorLoggerT$fApplicativeLoggerT$fMonadLoggerT$fMonadIOLoggerT$fMonadReaderLoggerT RichMessageFieldMap MessageField FieldTypeMessagemessageSeverity messageStack messageTextloglogDebuglogInfo logWarninglogError logException fmtMessageunMessageFielddefaultFieldMapfmtRichMessageDefaultupgradeMessageAction$fIsLabelfieldName(->) PureLogger PureLoggerTrunPureLoggerT runPureLogT runPureLoglogMessagePure$fFunctorPureLoggerT$fApplicativePureLoggerT$fMonadPureLoggerT$fMonadTransPureLoggerT$fMonadStatePureLoggerTLimitLimitTo UnlimitedwithLogRotation $fEqLimit $fOrdLimitbaseGHC.IO.Handle.TypesHandle GHC.Conc.SyncThreadIdco-log-core-0.1.1-inplace LogActiontransformers-0.5.5.0Control.Monad.Trans.ReaderReaderTGHC.BaseString System.IOputStrLnColog.Core.SeveritySeverityDebugInfoWarningError GHC.Exception Exception showSeverity time-1.8.0.2 Data.Time.Clock.Internal.UTCTimeUTCTimeData.Functor.IdentityIdentityfilterBySeverityDIWE Colog.Core.IO liftLogIOwithLogPrintFilelogPrintHandlelogPrintStderrlogPrintwithLogStringFilelogStringHandlelogStringStderrlogStringStdoutColog.Core.Class overLogActionHasLog getLogAction setLogAction<<==>>extendextract>|<chooselose*<>*>*<conquerdividecmapM>$>$<cfilter foldActions&><& unLogAction