Popularity
8.6
Declining
Activity
0.0
Stable
4
28
0

Monthly Downloads: 4
Programming language: Haskell
License: MIT License
Tags: Monad     Logging    
Latest version: v0.1.0.0

monad-logger-json alternatives and similar packages

Based on the "monad" category.
Alternatively, view monad-logger-json alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of monad-logger-json or a related project?

Add another 'monad' Package

README

Monad Logger functions for JSON

TravisCI Hackage

Install

As a library:

cabal install monad-logger-json

Usage (example)

{-# LANGUAGE TemplateHaskell #-}

import Control.Monad.IO.Class ( MonadIO(liftIO) )
import Control.Monad.Logger ( runStdoutLoggingT )
import Control.Monad.Logger.JSON ( logInfoJ, logDebugJ )
import Data.Aeson.TH ( defaultOptions, deriveJSON )
import Data.Time.Clock ( UTCTime, getCurrentTime )

data Message = Message { time :: UTCTime }

$( deriveJSON defaultOptions ''Message )

main :: IO ()
main =
  runStdoutLoggingT
    (do now <- liftIO getCurrentTime
        $logDebugJ (Message now)
        $logInfoJ "Hello world")