Skip to content

Commit

Permalink
Update readme and cabal file
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-abrar committed Dec 1, 2020
1 parent bd43f08 commit c9363e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------
Expand All @@ -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 #-}
Expand All @@ -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)
6 changes: 3 additions & 3 deletions monad-logger-extras.cabal
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit c9363e4

Please sign in to comment.