Safe Haskell | None |
---|---|
Language | Haskell2010 |
Logging functions
Synopsis
- type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m
- type LogExec m = forall a. KatipT m a -> m a
- type LogContext = LogEnv
- type LogLevel = Severity
- initLogContext :: IO LogContext
- runDefaultLogExecWithContext :: LogExecWithContext
- stdoutLoggingExec :: LogExecWithContext
- stdoutLoggingContext :: LogContext -> IO LogContext
- stderrLoggingExec :: LogExecWithContext
- stderrLoggingContext :: LogContext -> IO LogContext
- runNullLogExec :: LogExecWithContext
- _log :: (Applicative m, Katip m) => Text -> LogLevel -> Text -> m ()
- logExceptions :: (Katip m, MonadCatch m, Applicative m) => Text -> m a -> m a
- levelInfo :: LogLevel
- levelError :: LogLevel
- levelDebug :: LogLevel
Type Aliases (for compatibility)
type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m Source #
Runs a Katip logging block with the Log environment
type LogContext = LogEnv Source #
A Katip Log environment
default logger
initLogContext :: IO LogContext Source #
the default log environment
runDefaultLogExecWithContext :: LogExecWithContext Source #
Runs a Katip logging block with the Log environment
stdout logger
stdoutLoggingExec :: LogExecWithContext Source #
Runs a Katip logging block with the Log environment
stdoutLoggingContext :: LogContext -> IO LogContext Source #
A Katip Log environment which targets stdout
stderr logger
stderrLoggingExec :: LogExecWithContext Source #
Runs a Katip logging block with the Log environment
stderrLoggingContext :: LogContext -> IO LogContext Source #
A Katip Log environment which targets stderr
Null logger
runNullLogExec :: LogExecWithContext Source #
Disables Katip logging
Log Msg
Log Exceptions
logExceptions :: (Katip m, MonadCatch m, Applicative m) => Text -> m a -> m a Source #
re-throws exceptions after logging them