log4hs 0.0.3.0 → 0.0.4.0
raw patch · 2 files changed
+18/−62 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +14/−58
- log4hs.cabal +4/−4
README.md view
@@ -1,69 +1,25 @@ # A python logging style log library. -### A full example: -```haskell-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE QuasiQuotes #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE TemplateHaskell #-} +## Documentation -module Main (main) where+See [hackage](http://hackage.haskell.org/package/log4hs) -import Data.Aeson.QQ.Simple (aesonQQ)-import Prelude hiding (error)-import Logging (runJson, debug, info, warn, error, fatal, logv) -main :: IO ()-main = runJson manager app -myLogger = "MyLogger.Main"+## Contributing -app :: IO ()-app = do- $(debug) myLogger "this message should print into MyLogger"- $(info) myLogger "this message should print into MyLogger"- $(warn) myLogger "this message should print into MyLogger"- $(error) myLogger "this message should print into MyLogger"- $(fatal) myLogger "this message should print into MyLogger"- $(logv) myLogger "LEVEL 100" "this message should print into MyLogger"+The source code will be opened to public after version 1.0.0 released. So, please wait. --- The best practice is putting all config into a separate file,--- e.g "Logging.json"-manager = [aesonQQ|{- "loggers": {- "root": {- "level": "DEBUG",- "handlers": ["console"],- "propagate": false- },- "MyLogger": {- "level": "INFO",- "filterer": ["MyLogger.Main"],- "handlers": ["file"],- "propagate": false- }- },- "handlers": {- "console": {- "type": "StreamHandler",- "stream": "stderr",- "level": "DEBUG",- "formatter": "defaultFormatter"- },- "file": {- "type": "FileHandler",- "level": "INFO",- "formatter": "defaultFormatter",- "file": "./default.log"- }- },- "formatters": {- "defaultFormatter": {- "fmt": "%(asctime)s - %(level)s - %(logger)s - %(pathname)s/%(filename)s:%(lineno)d] %(message)s"- }- }-}|]-``` ++## Issue Reporting++Please send email to log4hs@version.cloud for now.++++## License++[BSD3](http://hackage.haskell.org/package/log4hs/src/LICENSE)
log4hs.cabal view
@@ -4,14 +4,14 @@ -- -- see: https://github.com/sol/hpack ----- hash: 98410eaec949ad056db17a215e79111cd33b233aeedfd41caeecb8c3207823ec+-- hash: 39b8ec0bbe2bdbabb40d4ad5b19d1a0ea0755ec5fe019af3de5f56f1f2b55c1f name: log4hs-version: 0.0.3.0+version: 0.0.4.0 synopsis: A python logging style log library-description: Please see the README+description: Please see the http://hackage.haskell.org/package/log4hs category: logging-maintainer: Jorah Gao <gqk007@gmail.com>+maintainer: Jorah Gao <log4hs@version.cloud> copyright: (c) 2019 Version Cloud license: BSD3 license-file: LICENSE