Safe Haskell | None |
---|---|
Language | Haskell2010 |
The MonadLogger
type-class and associated functions.
- data Settings
- defSettings :: Settings
- logLevel :: Settings -> Level
- setLogLevel :: Level -> Settings -> Settings
- output :: Settings -> Output
- setOutput :: Output -> Settings -> Settings
- format :: Settings -> DateFormat
- setFormat :: DateFormat -> Settings -> Settings
- delimiter :: Settings -> ByteString
- setDelimiter :: ByteString -> Settings -> Settings
- netstrings :: Settings -> Bool
- setNetStrings :: Bool -> Settings -> Settings
- bufSize :: Settings -> Int
- setBufSize :: Int -> Settings -> Settings
- name :: Settings -> Text
- setName :: Text -> Settings -> Settings
- data Level
- data Output
- data DateFormat
- iso8601UTC :: DateFormat
- data Logger
- new :: MonadIO m => Settings -> m Logger
- create :: MonadIO m => Output -> m Logger
- level :: Logger -> Level
- flush :: MonadIO m => Logger -> m ()
- close :: MonadIO m => Logger -> m ()
- clone :: Maybe Text -> Logger -> Logger
- settings :: Logger -> Settings
- class Monad m => MonadLogger m where
- trace :: MonadLogger m => (Msg -> Msg) -> m ()
- debug :: MonadLogger m => (Msg -> Msg) -> m ()
- info :: MonadLogger m => (Msg -> Msg) -> m ()
- warn :: MonadLogger m => (Msg -> Msg) -> m ()
- err :: MonadLogger m => (Msg -> Msg) -> m ()
- fatal :: MonadLogger m => (Msg -> Msg) -> m ()
Documentation
defSettings :: Settings Source
Default settings:
logLevel
=Debug
output
=StdOut
format
=iso8601UTC
delimiter
= ", "netstrings
= FalsebufSize
=defaultBufSize
name
= ""
setLogLevel :: Level -> Settings -> Settings Source
format :: Settings -> DateFormat Source
setFormat :: DateFormat -> Settings -> Settings Source
delimiter :: Settings -> ByteString Source
setDelimiter :: ByteString -> Settings -> Settings Source
netstrings :: Settings -> Bool Source
setNetStrings :: Bool -> Settings -> Settings Source
setBufSize :: Int -> Settings -> Settings Source
iso8601UTC :: DateFormat Source
ISO 8601 date-time format.
create :: MonadIO m => Output -> m Logger Source
Invokes new
with default settings and the given output as log sink.
clone :: Maybe Text -> Logger -> Logger Source
Clone the given logger and optionally give it a name
(use (Just "")
to clear).
trace :: MonadLogger m => (Msg -> Msg) -> m () Source
Abbreviation for log
using the corresponding log level.
debug :: MonadLogger m => (Msg -> Msg) -> m () Source
Abbreviation for log
using the corresponding log level.
info :: MonadLogger m => (Msg -> Msg) -> m () Source
Abbreviation for log
using the corresponding log level.
warn :: MonadLogger m => (Msg -> Msg) -> m () Source
Abbreviation for log
using the corresponding log level.