The monad-logger-prefix package

[Tags:apache, benchmark, library, test]

Add prefixes to your monad-logger output


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5.0), exceptions (>=0.8.0 && <0.9.0), monad-control (==1.0.*), monad-logger (>=0.3.12 && <0.4.0), mtl (>=2.1 && <2.3), resourcet (==1.1.*), text (>=1.1 && <1.3), transformers (>=0.3.0 && <0.5.3.0), transformers-base (==0.4.*) [details]
License Apache
Copyright 2016 Seller Labs
Author Matthew Parsons
Maintainer Matthew Parsons
Category System
Home page https://github.com/sellerlabs/monad-logger-prefix#readme
Bug tracker https://github.com/sellerlabs/monad-logger-prefix/issues
Source repository head: git clone https://github.com/sellerlabs/monad-logger-prefix
Uploaded Wed Sep 21 20:59:35 UTC 2016 by parsonsmatt
Distributions LTSHaskell:0.1.6, NixOS:0.1.6, Stackage:0.1.6, Tumbleweed:0.1.6
Downloads 220 total (4 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2016-11-19 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for monad-logger-prefix

Readme for monad-logger-prefix-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.