LicenseRef-Apache licensed and maintained by Matthew Parsons
This version can be pinned in stack with:monad-logger-prefix-0.1.6@sha256:87488b498072385fed58cf14ce08f4b0e1803376345f0038e8f3c0c68bcc0ad7,2051

Module documentation for 0.1.6

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

monad-logger-prefix uses Semantic Versioning. The change log is available through the releases on GitHub.