LicenseRef-Apache licensed and maintained by Matthew Parsons
This version can be pinned in stack with:monad-logger-prefix-0.1.12@sha256:91842d336f7eba236e6dc9a1913c546c86876e8b76ae093eb2b21d4aa2d3336f,1814

Module documentation for 0.1.12

monad-logger-prefix

Build Status

This package provides an easy way to add prefixes to any MonadLogger. Here’s a brief example:

{-# LANGUAGE TemplateHaskell #-}

import Control.Monad.Logger
import Control.Monad.Logger.Prefix

main :: IO ()
main = runStdoutLoggingT $ do
    $(logDebug) "This one has no prefix."

    "foo" `prefixLogs` do
        $(logDebug) "This one has a [foo] prefix."

        "bar" `prefixLogs` do
            $(logDebug) "This one has both [foo] and [bar] prefixes."

The package includes a benchmark demonstrating that there is no performance difference with ordinary logging.

Changes

Change log

0.1.12

  • Add support for unliftio-core >= 0.2.0

0.1.11

  • Relaxed upper bound on transformers

0.1.10

  • Relaxed upper bound on exceptions from 0.10 to 0.11

0.1.8

  • Relaxed upper bound on exceptions from 0.9 to 0.10

0.1.7

  • Relaxed upper bound on conduit