Safe Haskell | None |
---|---|
Language | Haskell2010 |
This modules contains support for logging.
Since: 0.5.65
Synopsis
- newtype Logger = MkLogger {}
- type CommandIO e = (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member LoggerReader e, Member B9ConfigReader e)
- type LoggerReader = Reader Logger
- withLogger :: (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member B9ConfigReader e) => Eff (LoggerReader ': e) a -> Eff e a
- b9Log :: CommandIO e => LogLevel -> String -> Eff e ()
- traceL :: CommandIO e => String -> Eff e ()
- dbgL :: CommandIO e => String -> Eff e ()
- infoL :: CommandIO e => String -> Eff e ()
- errorL :: CommandIO e => String -> Eff e ()
- errorExitL :: (CommandIO e, Member ExcB9 e) => String -> Eff e a
- printHash :: Hashable a => a -> String
Documentation
The logger to write log messages to.
Since: 0.5.65
type CommandIO e = (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member LoggerReader e, Member B9ConfigReader e) Source #
Convenience type alias for Eff
ects that have a B9Config
, a Logger
, MonadIO
and MonadBaseControl
.
Since: 0.5.65
withLogger :: (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member B9ConfigReader e) => Eff (LoggerReader ': e) a -> Eff e a Source #
Lookup the selected getLogVerbosity
and _logFile
from the B9Config
and open it.
Then run the given action; if the action crashes, the log file will be closed.
Since: 0.5.65