polysemy-log-co-0.2.2.0: polysemy-log interpreter for co-log
Safe HaskellNone
LanguageHaskell2010

Polysemy.Log.Colog.Colog

Description

 
Synopsis

Documentation

severityToColog :: Severity -> Severity Source #

Convert Severity into the co-log variant, Severity. Trace is conflated with Debug, and Crit into Error.

toColog :: LogEntry LogMessage -> Message Source #

Convert a default log message into the co-log-native Message.

interpretDataLogCologLocal :: forall a b r. Member (Log b) r => (a -> b) -> (a -> a) -> InterpreterFor (DataLog a) r Source #

Reinterpret DataLog as Log. Maintains a context function as state that is applied to each logged message, allowing the context of a block to be modified.

interpretDataLogColog :: forall a r. Member (Log a) r => InterpreterFor (DataLog a) r Source #

Reinterpret DataLog as Log.

interpretDataLogNative :: Member (Log Message) r => InterpreterFor (DataLog (LogEntry LogMessage)) r Source #

Reinterpret DataLog, specialized to the default message, as Log.

interpretLogColog :: Members [Log (LogEntry LogMessage), GhcTime] r => InterpreterFor Log r Source #

Reinterpret Log as Log, using the polysemy-log default message.

Since this adds a timestamp, it has a dependency on GhcTime. Use interpretLogColog' for a variant that interprets GhcTime in-place.

interpretLogColog' :: Members [Log (LogEntry LogMessage), Embed IO] r => InterpretersFor [Log, GhcTime] r Source #

Reinterpret Log as Log, also interpreting GhcTime.

interpretCologStdoutFormat :: forall msg m r. MonadIO m => Member (Embed m) r => (msg -> Text) -> InterpreterFor (Log msg) r Source #

Interpret Log by printing to stdout, using the provided message formatter.

interpretCologStdout :: forall m r. MonadIO m => Member (Embed m) r => InterpreterFor (Log (LogEntry LogMessage)) r Source #

Interpret Log with the default message by printing to stdout, using the default message formatter.

interpretLogStdout :: Member (Embed IO) r => InterpreterFor Log r Source #

Interpret Log fully in terms of Log, using the default message and stdout.

interpretLogStdoutConc :: Members [Resource, Async, Race, Embed IO] r => InterpreterFor Log r Source #

Like interpretLogStdout, but process messages concurrently.

interpretCologStdoutNative :: forall m r. MonadIO m => Member (Embed m) r => InterpreterFor (Log Message) r Source #

Interpret Log with the co-log message protocol by printing to stdout, using co-log's rich message formatter.

interpretLogCologAsNative :: Members [Log Message, GhcTime] r => InterpreterFor Log r Source #

Reinterpret Log as Log, using the co-log message protocol.

interpretLogStdoutAsNative :: Member (Embed IO) r => InterpretersFor [Log, Log Message] r Source #

Interpret Log fully in terms of Log, using co-log's message protocol and stdout.

interpretLogStdoutAsNativeConc :: Members [Resource, Async, Race, Embed IO] r => InterpretersFor [Log, Log Message] r Source #

Interpret Log fully in terms of Log, using co-log's message protocol and stdout.