package easy_logging_yojson
Configuration loader for easy_logging with yojson backend
Install
Dune Dependency
Authors
Maintainers
Sources
v0.8.2.tar.gz
md5=467a966433b97693e0c226a90b9b833e
sha512=d4b97a29225c454a2d8ed04495aa7ecd3b012d7258372be2450e9b672498ba24ce9a3079307e762e12948661bc1e104a90f167fabf60c212fe67b13d6c4edf51
Description
Provides deserialisation of logging configuration (loggers instantation and handlers parameters) from json, using ppx_deriving_yojson.
Logging infrastructure inspired by the Python logging module.
The aim of this module is to provide a quick and easy to use logging infrastructure.
It has the following features :
- one line logger creation
- log messages printf style, or [string] or [string lazy_t]
- tree logging architecture for light configuration
- handlers associated to each logger will format, filter and treat the message independantly.
- use the infrastructure with your own handlers with the [MakeLogging] functor.
- use tags to add contextual information to log messages
Published: 01 Aug 2021
README
Logging module for OCaml.
Quick start :
open Easy_logging
logger = Logging.make_logger "my_logger" Debug [Cli Debug];;
logger#info "log_message";;
See documentation at https://sapristi.github.io/easy_logging/easy_logging
Changelog
Version 0.8.2
- fix license in source code files (Mozilla Public License Version 2.0)
Version 0.8.1
- General cleanup
- Some refactoring (removed MakeLogging functor)
- Relax
ppx_deriving
dependency requirements. - Switch to Mozilla Public License 2.0
- Minimal version of OCaml is not 4.07
Version 0.7
- added tree_to_yojson function
- added level_of_string to Logging
- logger level is no more option type (NoLevel takes the role of None)
- fix json formatter
Version 0.6
- Added more options to file handlers (automatic timestamps and/or versioning of file names)
- Added CliErr handler to output to stderr
- modified handlers type so that fully custom handlers can be instantiated
- cleaned module API
- log items contains a timestamp
Version 0.6.2
- Added RotatingFile handlers : log file rotation based on file size
Version 0.5
- Renamed the Default_handlers module to handlers
- tag type in Handlers is now string (was unit)
- added the possibility to add filters to handlers
- added tag_generator feature to loggers, to automatically add tags to all messages passed to a logger
version 0.5.1
- log_level type is direcly accessible from Easy_logging and Easy_logging_yojson modules
version 0.5.2
- more file_handler options (timestamp, versioning)
Version 0.4
- printf style logging is now the default
simplifed configuration in case of multiple loggers (and closer to the python module) : the loggers form a tree (based on their name, dots indicating descendence)
- log items are passed to the handlers of a logger’s ancestors (so that few handlers need initialisation) (possible to override)
- loggers inherit the level of their ancestor if not set explicitely
- an additional package easy_logging_yojson provides initialisation of loggers from the json format (with ppx_deriving_yojson), so that configuration can be fully done outside the code.
Dependencies (5)
-
easy_logging
= version
-
ppx_deriving_yojson
>= "3.5"
-
ppx_deriving
>= "4.0"
-
dune
>= "1.8"
-
ocaml
>= "4.07.0"
Dev Dependencies
None
Used by (1)
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page