@hackage polysemy-log0.2.0.1

Polysemy effects for logging

Log thrice, debug once.

–– Г. Любенов

About

A common interface for the polysemy logging backend adapters:

import Polysemy.Log
import Polysemy.Log.Colog

prog :: Member Log r => Sem r ()
prog = do
  Log.debug "debugging"
  Log.error "failing"

interpretLogColog prog :: Sem [Colog.Log (LogEntry LogMessage), Embed IO] ()
interpretLogStdout prog :: Sem '[Embed IO] ()

For more documentation, please consult Hackage:

Building the Project

The build is defined in nix, supporting flake and legacy nix-build.

With nix-build:

nix-build -A defaultPackage
nix-build -A packages.x86_64-linux.polysemy-log-co

With nix flake:

nix build
nix build '.#polysemy-log-co'

To run all tests:

nix flake check