Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- logMessage :: forall m. (HasLogging m, MonadIO m) => LogMessage -> m ()
- checkLogLevel :: LogFilter -> LogMessage -> Bool
- checkLogLevel' :: LogFilter -> LogSource -> Level -> Bool
- checkContextFilter :: LogContext -> LogMessage -> Bool
- checkContextFilter' :: [LogContextFilter] -> LogSource -> Level -> Bool
- checkContextFilterM :: HasLogContext m => LogMessage -> m Bool
Functions of common use
logMessage :: forall m. (HasLogging m, MonadIO m) => LogMessage -> m () Source #
Log a message. This will add current context to context specified in the message. This function checks current context filter.
Utilities for backends implementation
checkLogLevel :: LogFilter -> LogMessage -> Bool Source #
Check if message level matches given filter.
checkLogLevel' :: LogFilter -> LogSource -> Level -> Bool Source #
Check if message level matches given filter.
checkContextFilter :: LogContext -> LogMessage -> Bool Source #
Check if message matches filters from logging context.
The message is passed if:
- No
include
filters are defined in context stack, OR the message conforms to ANY ofinclude
filters; - AND the message does not conform to any of
exclude
filters in the stack.
checkContextFilter' :: [LogContextFilter] -> LogSource -> Level -> Bool Source #
Check if message source and level passes specified filters.
The message is passed if:
- No
include
filters are defined in context stack, OR the message conforms to ANY ofinclude
filters; - AND the message does not conform to any of
exclude
filters in the stack.
checkContextFilterM :: HasLogContext m => LogMessage -> m Bool Source #
Check if message matches filters from logging context.
This function is similar to checkContextFilter
, but uses current context
from monadic state.