Safe Haskell | None |
---|
- class Monad m => MonadLogger m where
- monadLoggerLog :: ToLogStr msg => Loc -> LogLevel -> msg -> m ()
- monadLoggerLogSource :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> m ()
- data LogLevel
- = LevelDebug
- | LevelInfo
- | LevelWarn
- | LevelError
- | LevelOther Text
- type LogSource = Text
- logDebug :: Q Exp
- logInfo :: Q Exp
- logWarn :: Q Exp
- logError :: Q Exp
- logOther :: Text -> Q Exp
- logDebugS :: Q Exp
- logInfoS :: Q Exp
- logWarnS :: Q Exp
- logErrorS :: Q Exp
- logOtherS :: Q Exp
MonadLogger
class Monad m => MonadLogger m whereSource
monadLoggerLog :: ToLogStr msg => Loc -> LogLevel -> msg -> m ()Source
monadLoggerLogSource :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> m ()Source
MonadLogger IO | |
MonadLogger Identity | |
Monad (ST s) => MonadLogger (ST s) | |
Monad (ST s) => MonadLogger (ST s) | |
(Monad (ListT m), MonadLogger m) => MonadLogger (ListT m) | |
(Monad (ResourceT m), MonadLogger m) => MonadLogger (ResourceT m) | |
(Monad (MaybeT m), MonadLogger m) => MonadLogger (MaybeT m) | |
(Monad (IdentityT m), MonadLogger m) => MonadLogger (IdentityT m) | |
(Monad (ContT r m), MonadLogger m) => MonadLogger (ContT r m) | |
(Monad (ErrorT e m), MonadLogger m, Error e) => MonadLogger (ErrorT e m) | |
(Monad (ReaderT r m), MonadLogger m) => MonadLogger (ReaderT r m) | |
(Monad (StateT s m), MonadLogger m) => MonadLogger (StateT s m) | |
(Monad (StateT s m), MonadLogger m) => MonadLogger (StateT s m) | |
(Monad (WriterT w m), MonadLogger m, Monoid w) => MonadLogger (WriterT w m) | |
(Monad (WriterT w m), MonadLogger m, Monoid w) => MonadLogger (WriterT w m) | |
(Monad (RWST r w s m), MonadLogger m, Monoid w) => MonadLogger (RWST r w s m) | |
(Monad (RWST r w s m), MonadLogger m, Monoid w) => MonadLogger (RWST r w s m) |
TH logging
Generates a function that takes a Text
and logs a LevelDebug
message. Usage:
$(logDebug) "This is a debug log message"
logOther :: Text -> Q ExpSource
Generates a function that takes a Text
and logs a LevelOther
message. Usage:
$(logOther "My new level") "This is a log message"
TH logging with source
Generates a function that takes a LogSource
and Text
and logs a LevelDebug
message. Usage:
$logDebug "SomeSource" "This is a debug log message"