tintin-1.9.1: A softer alternative to Haddock

Safe HaskellSafe
LanguageHaskell2010

Tintin.Capabilities.Logging

Synopsis

Documentation

data Logging #

data Capability #

Capability for our context to be able to log from any place where it is available:

foo :: Has Logging.Capability e
    => Effectful e ()
foo = do
  log "Something happened :("
  ...

log :: Has Capability e => Text -> Effectful e () #

Logs a text message using the available logger

err :: Has Capability e => Text -> Effectful e () #

Logs an error message using the available logger

debug :: Has Capability e => Text -> Effectful e () #

Logs a debug message using the available logger

stdOut :: Capability #

Creates a logger that just prints things to STDOUT

mute :: Capability #

Creates a logger that does literally nothing