Safe Haskell | None |
---|---|
Language | Haskell2010 |
Small layer on top of fast-logger
which adds log-levels and
timestamp support (using date-cache
) and not much more.
- data Level
- data Output
- data Settings = Settings {
- logLevel :: Level
- output :: Output
- format :: DateFormat
- delimiter :: ByteString
- bufSize :: BufSize
- data Logger
- data DateFormat
- new :: MonadIO m => Settings -> m Logger
- create :: MonadIO m => Output -> m Logger
- defSettings :: Settings
- level :: Logger -> Level
- flush :: MonadIO m => Logger -> m ()
- close :: MonadIO m => Logger -> m ()
- log :: MonadIO m => Logger -> Level -> (Msg -> Msg) -> m ()
- trace :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
- debug :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
- info :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
- warn :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
- err :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
- fatal :: MonadIO m => Logger -> (Msg -> Msg) -> m ()
- iso8601UTC :: DateFormat
Documentation
Settings | |
|
create :: MonadIO m => Output -> m Logger Source
Invokes new
with default settings and the given output as log sink.
defSettings :: Settings Source
Default settings for use with new
:
logLevel
=Debug
output
=StdOut
format
=iso8601UTC
delimiter
= ", "bufSize
=defaultBufSize
log :: MonadIO m => Logger -> Level -> (Msg -> Msg) -> m () Source
Logs a message with the given level if greater or equal to the logger's threshold.
trace :: MonadIO m => Logger -> (Msg -> Msg) -> m () Source
Abbreviation of log
using the corresponding log level.
debug :: MonadIO m => Logger -> (Msg -> Msg) -> m () Source
Abbreviation of log
using the corresponding log level.
info :: MonadIO m => Logger -> (Msg -> Msg) -> m () Source
Abbreviation of log
using the corresponding log level.
warn :: MonadIO m => Logger -> (Msg -> Msg) -> m () Source
Abbreviation of log
using the corresponding log level.
err :: MonadIO m => Logger -> (Msg -> Msg) -> m () Source
Abbreviation of log
using the corresponding log level.
fatal :: MonadIO m => Logger -> (Msg -> Msg) -> m () Source
Abbreviation of log
using the corresponding log level.
iso8601UTC :: DateFormat Source
ISO 8601 date-time format.