polysemy-log-0.7.2.0: Polysemy effects for logging
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Log.Effect.DataLog

Description

 
Synopsis

Documentation

data DataLog a :: Effect where Source #

Structural logs, used as a backend for the simpler Text log effect, Log.

Can also be used on its own, or reinterpreted into an effect like those from co-log or di.

Constructors

DataLog :: a -> DataLog a m ()

Schedule an arbitrary value for logging.

Local :: (a -> a) -> m b -> DataLog a m b

Stores the provided function in the interpreter and applies it to all log messages emitted within the higher-order thunk that's the second argument.

type Logger = DataLog (LogEntry LogMessage) Source #

Alias for the logger with the default message type used by Log.

log :: HasCallStack => Members [Logger, GhcTime] r => Severity -> Text -> Sem r () Source #

Log a text message with the given severity. Basic Sem constructor.

trace :: HasCallStack => Members [Logger, GhcTime] r => Text -> Sem r () Source #

Log a text message with the Trace severity.

debug :: HasCallStack => Members [Logger, GhcTime] r => Text -> Sem r () Source #

Log a text message with the Debug severity.

info :: HasCallStack => Members [Logger, GhcTime] r => Text -> Sem r () Source #

Log a text message with the Info severity.

warn :: HasCallStack => Members [Logger, GhcTime] r => Text -> Sem r () Source #

Log a text message with the Warn severity.

error :: HasCallStack => Members [Logger, GhcTime] r => Text -> Sem r () Source #

Log a text message with the Error severity.

crit :: HasCallStack => Members [Logger, GhcTime] r => Text -> Sem r () Source #

Log a text message with the Crit severity.