arbor-monad-logger-0.1.1.3: Simple logging library

Safe HaskellNone
LanguageHaskell2010

Arbor.Monad.Logger.Types

Synopsis

Documentation

data Logger Source #

Constructors

Logger 
Instances
Generic Logger Source # 
Instance details

Defined in Arbor.Monad.Logger.Types

Associated Types

type Rep Logger :: Type -> Type #

Methods

from :: Logger -> Rep Logger x #

to :: Rep Logger x -> Logger #

type Rep Logger Source # 
Instance details

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")

data LogLevel #

Instances
Eq LogLevel 
Instance details

Defined in Control.Monad.Logger

Ord LogLevel 
Instance details

Defined in Control.Monad.Logger

Read LogLevel 
Instance details

Defined in Control.Monad.Logger

Show LogLevel 
Instance details

Defined in Control.Monad.Logger

Lift LogLevel 
Instance details

Defined in Control.Monad.Logger

Methods

lift :: LogLevel -> Q Exp #