h&.o*      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a#(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 Safe-Inferred"%&(/5;?#(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 Safe-Inferred"%&(/25;?co-logType alias for constraint for: Monad m have access to environment env. Environment env contains b that can log messages of type msg.Function call stack.If you use this constraint, function call stack will be propagated and you will have access to code lines that log messages.co-lognewtype wrapper c that keeps b in its context. co-log*Perform logging action with given message msg5. This function works for monads that have access to b.$You can use this function like this:  example ::  env d m => m () example = do   "First message..."   "Second message..." co-logLogs multiple messages. co-logPerforms given monadic logging action by applying function to every logging record. app ::  env d m => m () app =   (cmap ("app:" ++)) $ do   "First message..."   "Second message..." co-logLifts b+ by allowing to log in a transformed monad.co-log Runner for  monad. Let's consider one simple example of monadic action you have: app ::  env d m => m () app = do   "Starting application..."   (cmap ("app:" ++)) $ do   "Application started."   "Application finished." 6You can use the following way of running such example:  (b e) app And you will see this output: Starting application... app:Application started. app:Application finished.    #(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 Safe-Inferred"%&()*/158;?co-logSpecialised version of 2 that stores severity, callstack and text message.co-logContains additional data to !% to display more verbose information.co-logDepedent 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  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: newtype MessageField m fieldName = MessageField { unMesssageField :: m (FieldType fieldName) } co-logOpen 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-log& parametrized by the f: type. Most formatting functions in this module work with f from  co-log-core."co-logMessage data type without f. Use 1 to log messages of this type.&co-logGeneral logging message data type. Contains the following fields: Polymorphic severity. This can be anything you want if you need more flexibility. Function g. It provides useful information about source code locations where each particular function was called.Custom text for logging.+co-log%Logs the message with given severity sev.,co-logLogs the message with the h severity.-co-logLogs the message with the i severity..co-logLogs the message with the j severity./co-logLogs the message with the k severity.0co-logLogs l message with the k severity.1co-logLogs " without severity, only g and m body message.2co-log Formats the !( type according to the following format: +[Severity] [SourceLocation]  Examples: [Warning] [Main.app#39] Starting application... [Debug] [Main.example#34] app: First message... See : for a richer format.3co-log Formats the "+ type in according to the following format:  [SourceLocation]  Examples: [Main.app#39] Starting application... [Main.example#34] app: First message... See ; for richer format.4co-log Alias for n specialized for formatting purposes. If you have an action that can output m (for example 3), you can convert it to the action that can print " or !: logSimpleMsgStdout :: b o " logSimpleMsgStdout = 4 3  logMessageStdout :: b o ! logMessageStdout = 4 2  5co-log5Formats severity in different colours with alignment.6co-log4Shows source code locations in the following format: [Main.example#35] 7co-logExtracts field from the  constructor.8co-logHelper function to deal with  when looking it up in the .9co-log5Default message map that contains actions to extract p and q#. Basically, the following mapping: "threadId" -> r "posixTime" -> s :co-logFormats  in the following way: =[Severity] [Time] [SourceLocation] [ThreadId]  Examples: [Debug] [03 May 2019 05:23:19.058 +00:00] [Main.example#34] [ThreadId 11] app: First message... [Info] [03 May 2019 05:23:19.059 +00:00] [Main.example#35] [ThreadId 11] app: Second message... See 2+ if you don't need both time and thread ID.;co-logFormats  in the following way: 2[Time] [SourceLocation] [ThreadId]  Examples: [03 May 2019 05:23:19.058 +00:00] [Main.example#34] [ThreadId 11] app: First message... [03 May 2019 05:23:19.059 +00:00] [Main.example#35] [ThreadId 11] app: Second message... %Practically, it formats a message as :" without the severity information.<co-logCustom formatting function for . It extracts p and q: from fields and allows you to specify how to format them.=co-log#Shows time in the following format:%showTime $ C.Time 1577656800000000000$"[29 Dec 2019 22:00:00.000 +00:00] ">co-log#Shows time in the following format:showTimeOffset $ C.timeToOffsetDatetime (C.Offset $ -120) $ C.Time 1577656800000000000$"[29 Dec 2019 20:00:00.000 -02:00] "tco-logGiven a OffsetDatetime, constructs a m u corresponding to a Day/Month/Year,Hour/Minute/Second/Offset encoding of the given OffsetDatetime. Example: 29 Dec 2019 22:00:00.000 +00:00?co-log*Shows a thread id in the following format:>> showThreadId  $1 Control.Concurrent.myThreadId "[ThreadId 4898] "@co-logAllows to extend basic !) type with given dependent map of fields.) !"#$%&'()*+,-./0123456789:;<=>?@)"#$%134&'()*!+,-./0256=>? 789:;<@#(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 Safe-Inferred"%&(/5;?" Bco-logAction that prints v to stdout. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.Cco-logAction that prints v to stderr. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.Dco-logAction that prints v to w. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.Eco-logAction that prints v to file. See   for details.Fco-logAction that prints m to stdout. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.Gco-logAction that prints m to stderr. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.Hco-logAction that prints m to w. This action does not flush the output buffer. If buffering mode is block buffering, the effect of this action can be delayed.Ico-logAction that prints m to file. See   for details.Jco-logAction that prints ! to x. Kco-logAction that constructs   and prints formatted ! for it to x. BCDEFGHIJK BCDEFGHIJK#(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 Safe-Inferred"%&(/5;?$Lco-logM specialized to yMco-log0Pure monad transformer for logging. Can log any msg messages. Allows to log messages by storing them in the internal state.Pco-logReturns result value of M and list of logged messages.Qco-logReturns result value of L and list of logged messages.Rco-logb that prints msg, by appending it to the end of the sequence.LMNOPQRMNOPLQR#(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 experimental Safe-Inferred"%&(/5;?)[co-log5Limit for the logger rotation. Used for two purposes: Limit the number of kept files.Limit the size of the files.^co-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).If 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 () action is called on the oldest file. As simple solution, you can pass  removeFile function to delete old files but you can also pass some archiving function if you don't want to lose old logs.^co-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 action[\]^[\]^ #(c) 2018-2022 Kowainik, 2023 Co-LogMPL-2.0 Safe-Inferred"%&(/5;?*z{|}~fjikhnb  !"%#$&*)'(+,-./0123456789:;<=>?@BCDEFGHIJKLMNOPQR[\]^      !"#$ %%&'())*+,,-.//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTTUVWXYZ[\]^_`abcdefg hijklmnlop qrlst qu qv qw qxlyz{|} ~ll{lll q q q q q q q q q q                                        h %co-log-0.6.0.2-7aZql7eCuHJIblcAP85C1p Colog.Monad Colog.Contra Colog.Message Colog.Actions Colog.PureColog.Rotation logTextStdoutColog.Core.ActionwithLogStringFile RichMessageColog*co-log-core-0.3.2.0-ITVp0Pu9EyyIO657g6Wn1fColog.Core.Class logActionL overLogAction setLogAction getLogActionHasLog$fDecidableLogAction$fDivisibleLogActionWithLogLoggerT runLoggerTlogMsglogMsgswithLog liftLogAction usingLoggerT$fMonadTransLoggerT$fFunctorLoggerT$fApplicativeLoggerT$fMonadLoggerT$fMonadIOLoggerT$fMonadFailLoggerT$fMonadReaderLogActionLoggerT$fMonadUnliftIOLoggerTRichMsg richMsgMsg richMsgMapFieldMap MessageField FieldTypeMessage SimpleMsgsimpleMsgStack simpleMsgTextMsg msgSeveritymsgStackmsgTextloglogDebuglogInfo logWarninglogError logExceptionlogText fmtMessagefmtSimpleMessage formatWith showSeverity showSourceLocunMessageField extractFielddefaultFieldMapfmtRichMessageDefaultfmtSimpleRichMessageDefaultfmtRichMessageCustomDefaultshowTimeshowTimeOffset showThreadIdupgradeMessageAction$fFunctorRichMsglogByteStringStdoutlogByteStringStderrlogByteStringHandlewithLogByteStringFile logTextStderr logTextHandlewithLogTextFilesimpleMessageActionrichMessageAction PureLogger PureLoggerTrunPureLoggerT runPureLogT runPureLoglogMessagePure$fFunctorPureLoggerT$fApplicativePureLoggerT$fMonadPureLoggerT$fMonadTransPureLoggerT$fMonadStateSeqPureLoggerT$fMonadFailPureLoggerT$fMonadIOPureLoggerT$fMonadThrowPureLoggerTLimitLimitTo UnlimitedwithLogRotation $fEqLimit $fOrdLimit $fShowLimit LogActiontransformers-0.5.6.2Control.Monad.Trans.ReaderReaderTbaseGHC.BaseString System.IOputStrLnColog.Core.SeveritySeverityGHC.Stack.Types CallStackDebugInfoWarningErrorGHC.Exception.Type Exception text-1.2.5.0Data.Text.InternalTextcmapghc-prim GHC.TypesIO GHC.Conc.SyncThreadId&chronos-1.1.5.1-K7mf75N9wgHKolBboMg4DIChronosTime myThreadIdnowbuilderDmyHMSzData.Text.Internal.BuilderBuilderbytestring-0.11.3.1Data.ByteString.Internal ByteStringGHC.IO.Handle.TypesHandleGHC.IO.StdHandlesstdoutData.Functor.IdentityIdentity mapSeverityfilterBySeverityDIWE WithSeverity getSeveritygetMsg Colog.Core.IOlogFlush liftLogIOwithLogPrintFilelogPrintHandlelogPrintStderrlogPrintlogStringHandlelogStringStderrlogStringStdoutLens'hoistLogActionseparate multiplicate duplicate<<==>>extendextract>|<chooseMchooselose*<>*>*<conquerdivideMdividecmapM>$ cmapMaybeM cmapMaybe>$<cfilterMcfilter foldActions&><& unLogAction