tintin-1.10.0: A softer alternative to Haddock

Safe HaskellSafe
LanguageHaskell2010

Tintin.Capabilities.Logging

Synopsis

Documentation

data Capability Source #

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 () Source #

Logs a text message using the available logger

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

Logs an error message using the available logger

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

Logs a debug message using the available logger

stdOut :: Capability Source #

Creates a logger that just prints things to STDOUT

mute :: Capability Source #

Creates a logger that does literally nothing