Description
A python logging style log library.
Description
log4hs
aims at providing a rich featured logging library for Haskell, just like logging
for Python and log4j
for Java.
To get started, see the sample example in README.md
and document in hackage.
It's still under development, so be carefull when using it in production environment.
README.md
A python logging style log library.
Documentation
Please See http://hackage.haskell.org/package/log4hs
Example
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main ( main ) where
import Logging.Config.Json (getManager)
import Logging.Global (run)
import Logging.Global.TH (debug, error, fatal, info, logv, warn)
import Prelude hiding (error)
main :: IO ()
main = getManager "{}" >>= flip run app
logger = "Main"
app :: IO ()
app = do
$(debug) logger "this is a test message"
$(info) logger "this is a test message"
$(warn) logger "this is a test message"
$(error) logger "this is a test message"
$(fatal) logger "this is a test message"
$(logv) logger "LEVEL 100" "this is a test message"
Contributing
The source code will be opened to public after version 1.0.0 released. So, please wait.
Issue Reporting
Please send email to [email protected] for now.