Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data LogSettings
- data LogLevels
- data LogDestination
- data LogFormat
- data LogColor
- readLogLevels :: String -> Either String LogLevels
- readLogDestination :: String -> Either String LogDestination
- readLogFormat :: String -> Either String LogFormat
- readLogColor :: String -> Either String LogColor
- defaultLogSettings :: LogSettings
- setLogSettingsLevels :: LogLevels -> LogSettings -> LogSettings
- setLogSettingsDestination :: LogDestination -> LogSettings -> LogSettings
- setLogSettingsFormat :: LogFormat -> LogSettings -> LogSettings
- setLogSettingsColor :: LogColor -> LogSettings -> LogSettings
- setLogSettingsBreakpoint :: Int -> LogSettings -> LogSettings
- setLogSettingsConcurrency :: Maybe Int -> LogSettings -> LogSettings
- getLogSettingsLevels :: LogSettings -> LogLevels
- getLogSettingsDestination :: LogSettings -> LogDestination
- getLogSettingsFormat :: LogSettings -> LogFormat
- getLogSettingsColor :: LogSettings -> LogColor
- getLogSettingsBreakpoint :: LogSettings -> Int
- getLogSettingsConcurrency :: LogSettings -> Maybe Int
- shouldLogLevel :: LogSettings -> LogSource -> LogLevel -> Bool
- shouldColorAuto :: Applicative m => LogSettings -> m Bool -> m Bool
- shouldColorHandle :: MonadIO m => LogSettings -> Handle -> m Bool
Documentation
data LogSettings Source #
Instances
Reading settings, e.g. from ENV
Construction
Modify
setLogSettingsColor :: LogColor -> LogSettings -> LogSettings Source #
setLogSettingsBreakpoint :: Int -> LogSettings -> LogSettings Source #
setLogSettingsConcurrency :: Maybe Int -> LogSettings -> LogSettings Source #
Set the number of LoggerSet
Buffers used by fast-logger
A value of Nothing
means to use getNumCapabilities
. Higher is more
performant, but may deliver messages out of order. The defualt is set for TTY
usage (so, 1
), but is also changed through setLogSettingsFormat
is used.
Support for this option depends on your version of fast-logger
:
fast-logger | Destination | Supported? |
---|---|
>=3.1.1 | anywhere | yes |
>=3.0.5 | file | yes |
>=3.0.5 | stdout/stderr | no |
<3.0.5 | anywhere | no |
Access
Logic
shouldLogLevel :: LogSettings -> LogSource -> LogLevel -> Bool Source #
shouldColorAuto :: Applicative m => LogSettings -> m Bool -> m Bool Source #
shouldColorHandle :: MonadIO m => LogSettings -> Handle -> m Bool Source #