Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Log :: Effect where
- Log :: HasCallStack => LogMessage -> Log m ()
- log :: HasCallStack => Member Log r => Severity -> Text -> Sem r ()
- trace :: HasCallStack => Member Log r => Text -> Sem r ()
- debug :: HasCallStack => Member Log r => Text -> Sem r ()
- info :: HasCallStack => Member Log r => Text -> Sem r ()
- warn :: HasCallStack => Member Log r => Text -> Sem r ()
- error :: HasCallStack => Member Log r => Text -> Sem r ()
- crit :: HasCallStack => Member Log r => Text -> Sem r ()
Documentation
data Log :: Effect where Source #
The default high-level effect for simple text messages. To be used with the severity constructors:
import qualified Polysemy.Log as Log prog = do Log.debug "debugging…" Log.warn "warning!"
Interpreters should preprocess and relay the message to DataLog
.
Log :: HasCallStack => LogMessage -> Log m () | Schedule a message to be logged. |
log :: HasCallStack => Member Log r => Severity -> Text -> Sem r () Source #
Log a message with the given severity.
Basic Sem
constructor.
trace :: HasCallStack => Member Log r => Text -> Sem r () Source #
Log a message with the Trace
severity.
debug :: HasCallStack => Member Log r => Text -> Sem r () Source #
Log a message with the Debug
severity.
info :: HasCallStack => Member Log r => Text -> Sem r () Source #
Log a message with the Info
severity.
warn :: HasCallStack => Member Log r => Text -> Sem r () Source #
Log a message with the Warn
severity.