Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- severityToColog :: Severity -> Severity
- toColog :: LogEntry LogMessage -> Message
- interpretDataLogCologLocal :: forall a b r. Member (Log b) r => (a -> b) -> (a -> a) -> InterpreterFor (DataLog a) r
- interpretDataLogColog :: forall a r. Member (Log a) r => InterpreterFor (DataLog a) r
- interpretDataLogNative :: Member (Log Message) r => InterpreterFor (DataLog (LogEntry LogMessage)) r
- interpretLogColog :: Members [Log (LogEntry LogMessage), GhcTime] r => InterpreterFor Log r
- interpretLogColog' :: Members [Log (LogEntry LogMessage), Embed IO] r => InterpretersFor [Log, GhcTime] r
- interpretCologStdoutFormat :: forall msg m r. MonadIO m => Member (Embed m) r => (msg -> Text) -> InterpreterFor (Log msg) r
- interpretCologStdout :: forall m r. MonadIO m => Member (Embed m) r => InterpreterFor (Log (LogEntry LogMessage)) r
- interpretLogStdout :: Member (Embed IO) r => InterpreterFor Log r
- interpretLogStdoutConc :: Members [Resource, Async, Race, Embed IO] r => InterpreterFor Log r
- interpretCologStdoutNative :: forall m r. MonadIO m => Member (Embed m) r => InterpreterFor (Log Message) r
- interpretLogCologAsNative :: Members [Log Message, GhcTime] r => InterpreterFor Log r
- interpretLogStdoutAsNative :: Member (Embed IO) r => InterpretersFor [Log, Log Message] r
- interpretLogStdoutAsNativeConc :: Members [Resource, Async, Race, Embed IO] r => InterpretersFor [Log, Log Message] r
Documentation
severityToColog :: Severity -> Severity Source #
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 #
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.