From c9363e4766743c1839efc5304dd97bb89b7a9f3e Mon Sep 17 00:00:00 2001 From: Ali Abrar Date: Mon, 30 Nov 2020 20:09:06 -0500 Subject: [PATCH] Update readme and cabal file --- README.md | 9 +++++++-- monad-logger-extras.cabal | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4644427..4387387 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ Description This package provides a way to compose logging actions so that you can conveniently log to multiple destinations. It also includes implementations of a few common logging actions: logging to stdout, stderr, nowhere (similar to `NoLoggingT`), and to a posix syslog (using [hsyslog](https://hackage.haskell.org/package/hsyslog)). -It also contains a couple of orphan instances for [`LoggingT`](https://hackage.haskell.org/package/monad-logger-0.3.36/docs/Control-Monad-Logger.html#t:LoggingT): `MonadPlus` and `Alternative`. +Logs can be emitted in color by using the `colorize` or `colorizeWith` function on your `Logger`. + +This package also contains a couple of orphan instances for [`LoggingT`](https://hackage.haskell.org/package/monad-logger-0.3.36/docs/Control-Monad-Logger.html#t:LoggingT): `MonadPlus` and `Alternative`. Example usage ------------- @@ -22,7 +24,6 @@ journalctl --user -t log-test -f This example can be built and run using cabal (either `cabal repl example` or `cabal build example`). - ```haskell > {-# LANGUAGE OverloadedStrings #-} @@ -40,3 +41,7 @@ This example can be built and run using cabal (either `cabal repl example` or `c > logErrorN "This is an error!" ``` + +This should produce output that looks like this (note that the stdout log has been `colorize`d): + +![Example output](https://i.imgur.com/nkVAHrM.png) diff --git a/monad-logger-extras.cabal b/monad-logger-extras.cabal index 320fbab..e7dcc63 100644 --- a/monad-logger-extras.cabal +++ b/monad-logger-extras.cabal @@ -1,11 +1,11 @@ cabal-version: >=1.10 name: monad-logger-extras -version: 0.1.0.0 +version: 0.1.1.0 synopsis: - Utilities for composing loggers, plus a few orphan instances. + Utilities for composing loggers, coloring output, plus a few orphan instances. description: - Build composable logging backends for monad-logger. This package includes a few composable backends (including a posix syslog backend). + Build composable logging backends for monad-logger. This package includes a few composable backends (including a posix syslog backend) and some extras like log output coloring utilities. homepage: https://github.com/obsidiansystems/monad-logger-extras bug-reports: