polysemy-log-0.4.2.0: Polysemy Effects for Logging
Safe HaskellNone
LanguageHaskell2010

Polysemy.Log.Level

Description

 
Synopsis

Documentation

setLogLevelWith :: forall msg r a. Member (DataLog msg) r => (msg -> Severity) -> Maybe Severity -> Sem r a -> Sem r a Source #

Set the minimum severity for messages to be handled, with Nothing meaning no messages are logged. This can be used with arbitrary message types, using the ex argument to extract the severity from the message.

setLogLevel :: Member (DataLog (LogEntry LogMessage)) r => Maybe Severity -> Sem r a -> Sem r a Source #

Set the minimum severity for messages to be handled, with Nothing meaning no messages are logged.