polysemy-log-di-0.9.0.0: Di adapters for Polysemy.Log
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Log.Di.Di

Description

 
Synopsis

Documentation

interpretDataLogDiLocal :: forall level path msg r. Member (Di level path msg) r => (msg -> level) -> (msg -> msg) -> InterpreterFor (DataLog msg) r Source #

Reinterpret DataLog as Di, using the provided function to extract the log level from the message. Maintains a context function as state that is applied to each logged message, allowing the context of a block to be modified.

interpretDataLogDi :: forall level path msg r. Member (Di level path msg) r => (msg -> level) -> InterpreterFor (DataLog msg) r Source #

Reinterpret DataLog as Di, using the provided function to extract the log level from the message.

interpretLogDi :: forall path r. Members [Di Severity path (LogEntry LogMessage), GhcTime] r => InterpreterFor Log r Source #

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

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

interpretLogDi' :: forall path r. Members [Di Severity path (LogEntry LogMessage), Embed IO] r => InterpretersFor [Log, GhcTime] r Source #

Reinterpret Log as Di, also interpreting GhcTime.

interpretLogDiConc :: forall path r. Members [Di Severity path (LogEntry LogMessage), Resource, Async, Race, Embed IO] r => Int -> InterpreterFor Log r Source #

Reinterpret Log as Di concurrently.