Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- data Logger = Logger {
- loggerLog :: forall a. ToLogStr a => a -> IO ()
- loggerClose :: IO ()
- loggerType :: LogType
- createLoggerViaConfig :: KeterConfig -> String -> IO Logger
- defaultRotationSpec :: FilePath -> FileLogSpec
- defaultMaxTotal :: Integer
- defaultBufferSize :: Int
Documentation
Record wrapper over a fast logger (log,close) function tuple, just to make it less unwieldy and obscure.
The LogType
is also tracked, in case formatting depends on it.
Logger | |
|
createLoggerViaConfig Source #
:: KeterConfig | |
-> String | Log file name |
-> IO Logger |
Create a logger based on a KeterConfig
.
If log rotation is enabled in the config, this will return a rotating file logger;
and a stderr logger otherwise.
defaultMaxTotal :: Integer Source #
The default total file size before for a log file before it needs to be rotated
defaultBufferSize :: Int Source #
The default log message buffer size