Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains types and functions for log message severities.
Synopsis
- data Level = Level {}
- levelToLogLevel :: Level -> LogLevel
- logLevelToLevel :: LogLevel -> Level
- parseLevel :: [Level] -> Text -> Maybe Level
- trace_level :: Level
- debug_level :: Level
- info_level :: Level
- warn_level :: Level
- error_level :: Level
- fatal_level :: Level
- disable_logging :: Level
Data types
Logging message severity level data type
Utility functions
levelToLogLevel :: Level -> LogLevel Source #
Conversion function
logLevelToLevel :: LogLevel -> Level Source #
Convertion function. Note that LevelOther
is
translated to integer level 210 and Syslog's Alert priority,
since in monad-logger
semantics any LevelOther is more severe
than LevelError.
Detect Level
from it's name. This function
is not case-sensitive.
Standard severity levels
trace_level :: Level Source #
TRACE level is supposed to be used for development-stage debugging. Has integer value of 600.
debug_level :: Level Source #
DEBUG level is supposed to be used for debug logging that can be enabled on production. Has integer value of 500.
info_level :: Level Source #
INFO level: some event occured. Has integer value of 400.
warn_level :: Level Source #
WARN level: something went wrong, but for now it will not affect system's stability. Has integer value of 300.
error_level :: Level Source #
ERROR level: something went wrong. Has integer value of 200.
fatal_level :: Level Source #
FATAL level: something went terribly wrong, application is to be stopped. Has integer value of 100.
disable_logging :: Level Source #
DISABLED level. This has integer identifier of 0, which is supposed to be less than any other level. This value can be used to disable logging at all.