log4hs: A python logging style log library

[ bsd3, library, log, logging ] [ Propose Tags ] [ Report a vulnerability ]

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.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1.0, 0.0.2.0, 0.0.3.0, 0.0.4.0, 0.0.5.0, 0.0.6.0, 0.0.7.0, 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.4.0.0, 0.5.0.0, 0.6.0.0, 0.7.0.0, 0.7.1.0, 0.8.0.0, 0.9.0.0 (info)
Change log ChangeLog.md
Dependencies aeson (>=1.2 && <2.0), aeson-default (>=0.9 && <1.0), base (>=4.7 && <5), bytestring (>=0.10 && <1.0), containers (>=0.5.10 && <1.0), directory (>=1.2 && <1.4), filepath (>=1.3 && <1.5), generic-lens (>=0.5 && <2.0), microlens (>=0.4 && <1.0), mtl (>=2.2 && <3.0), template-haskell (>=2.0 && <3.0), text (>=1.2 && <2.0), time (>=1.4 && <2.0), vformat (>=0.14.1 && <1.0), vformat-aeson (>=0.1 && <1.0), vformat-time (>=0.1 && <1.0), yaml (>=0.9 && <1.0) [details]
License BSD-3-Clause
Copyright (c) 2019 Version Cloud
Author
Maintainer Jorah Gao <jorah@version.cloud>
Category logging, log, library
Uploaded by gqk007 at 2020-02-04T08:35:47Z
Distributions
Downloads 4421 total (43 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-02-04 [all 1 reports]

Readme for log4hs-0.9.0.0

[back to package description]

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 jorah@version.cloud for now.

License

BSD3