Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Logger = Logger {}
- type TimedFastLogger = (FormattedTime -> LogStr) -> IO ()
- data LogLevel
Documentation
Instances
Generic Logger Source # | |
type Rep Logger Source # | |
Defined in Arbor.Monad.Logger.Types type Rep Logger = D1 (MetaData "Logger" "Arbor.Monad.Logger.Types" "arbor-monad-logger-0.1.1.3-1GyA9tr6CDI5F1W6M4Scb1" False) (C1 (MetaCons "Logger" PrefixI True) (S1 (MetaSel (Just "logger") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TimedFastLogger) :*: S1 (MetaSel (Just "logLevel") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LogLevel))) |
type TimedFastLogger = (FormattedTime -> LogStr) -> IO () #
TimedFastLogger
pass FormattedTime
to callback and simply log its result.
this can be used to customize how to log timestamp.
Usually, one would write a wrapper on top of TimedFastLogger
, for example:
{--} log :: TimedFastLogger -> LogStr -> IO () log logger msg = logger (time -> toLogStr (show time) <> " " <> msg <> "n")