| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Control.Monad.Logger.Extras
Description
Synopsis
- runLoggerLoggingT :: LoggingT m a -> Logger -> m a
 - type LogF = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
 - newtype Logger = Logger {}
 - logToStderr :: Logger
 - logToStdout :: Logger
 - logToNowhere :: Logger
 - logToSyslog :: String -> Logger
 - colorize :: Logger -> Logger
 - colorizeWith :: [(LogLevel, Color)] -> Logger -> Logger
 - defaultColors :: [(LogLevel, Color)]
 - mapLogStrBS :: ToLogStr msg => (ByteString -> msg) -> LogStr -> LogStr
 - wrapSGRCode :: [SGR] -> ByteString -> ByteString
 - wrapSGRColor :: Color -> ByteString -> ByteString
 - test :: IO ()
 
Documentation
runLoggerLoggingT :: LoggingT m a -> Logger -> m a Source #
type LogF = Loc -> LogSource -> LogLevel -> LogStr -> IO () Source #
Type synonym for a logging action. See defaultLogStr for the default
 formatting of this data.
logToStderr :: Logger Source #
Composable stderr logging action.
logToStdout :: Logger Source #
Composable stdout logging action.
logToNowhere :: Logger Source #
This logger doesn't perform any logging action.
logToSyslog :: String -> Logger Source #
Log messages to a posix system log. The string argument is a tag that can
 be used to identify log messages produced by this logger.
 You can, for instance, run journalctl --user -t mytag to see log messages
 tagged with "mytag".
colorize :: Logger -> Logger Source #
Add colors to your log output based on LogLevel. Colors can be
 customized by using colorizeWith instead.
colorizeWith :: [(LogLevel, Color)] -> Logger -> Logger Source #
Add a custom set of colors to your log output. See defaultColors for an
 example.
mapLogStrBS :: ToLogStr msg => (ByteString -> msg) -> LogStr -> LogStr Source #
Map a function over a log string.
wrapSGRCode :: [SGR] -> ByteString -> ByteString Source #
Apply SGR codes to a string to modify its display attributes, resetting
 SGR codes afterward.
wrapSGRColor :: Color -> ByteString -> ByteString Source #
Apply an SGR color code to a string, unsetting the color after the string.