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

Polysemy.Log.Log

Description

 
Synopsis

Documentation

interpretLogLogMetadata :: Members [LogMetadata LogMessage, GhcTime] r => InterpreterFor Log r Source #

Interpret Log into the intermediate internal effect LogMetadata.

interpretLogMetadataDataLog :: forall a r. Members [DataLog (LogEntry a), GhcTime] r => InterpreterFor (LogMetadata a) r Source #

Interpret the intermediate internal effect LogMetadata into DataLog.

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

interpretLogMetadataDataLog' :: Members [DataLog (LogEntry a), Embed IO] r => InterpretersFor [LogMetadata a, GhcTime] r Source #

Interpret the intermediate internal effect LogMetadata into DataLog.

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

Interpret Log into DataLog, adding metadata information and wrapping with LogEntry.

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

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

Interpret Log into DataLog, adding metadata information and wrapping with LogEntry.

interpretLogDataLogConc :: Members [DataLog (LogEntry LogMessage), Resource, Async, Race, Embed IO] r => Int -> InterpreterFor Log r Source #

Interpret Log into DataLog concurrently, adding metadata information and wrapping with LogEntry.

interpretDataLogLocal :: forall a r. (a -> a) -> (a -> Sem r ()) -> InterpreterFor (DataLog a) r Source #

Helper for maintaining a context function as state that is applied to each logged message, allowing the context of a block to be modified.

interpretDataLog :: forall a r. (a -> Sem r ()) -> InterpreterFor (DataLog a) r Source #

Combinator for building DataLog interpreters that handles Local.