@hackage om-logging1.1.0.4
Opinionated logging utilities.
Installation
Dependencies (9)
- aeson >=2.0.3.0 && <2.1
- base >=4.15.0.0 && <4.16
- bytestring >=0.10.12.1 && <0.11
- fast-logger >=3.1.1 && <3.2
- monad-logger >=0.3.36 && <0.4
- om-show >=0.1.2.0 && <0.2 Show all…
Dependents (1)
@hackage/om-legion
om-logging
This package provides various combinators for composing loggers for use with the monad-logger package.
It also provides an opinion about what a good log message looks like.
For instance, the opinionated "standard" log format is defined using the other combinators:
{- |
Log to the indicated destination, applying the "standard" filters
and formats.
-}
withStandardFormat
:: LogLevel {- ^ The minimum log level that will be logged. -}
-> (Loc -> LogSource -> LogLevel -> LogStr -> IO ()) {- ^ The base logger. -}
-> Loc
-> LogSource
-> LogLevel
-> LogStr
-> IO ()
withStandardFormat logLevel =
filterLogging (levelFilter logLevel)
. withPrefix ": "
. withThread
. withPackage
. withLevel
. withTime