package easy_logging
Module to log messages. Aimed at being both powerful and easy to use
Install
Dune Dependency
Authors
Maintainers
Sources
v0.6.2.tar.gz
md5=2c805f25050b6917a4c99edbd3bb73fb
sha512=a20aa4cbcbfa4b8241daf4775f86e91ed3b91dcec51ad628edff5d6857354e63d93c312c023a5c0e59f2924f051d618636701563933e89762af63679f981f18b
doc/easy_logging/Easy_logging/Handlers/index.html
Module Easy_logging.Handlers
Source
Default implementation of a Handlers module.
This is the Handlers
module. It provides simple yet adaptable handlers implementation.
Type definitions
Source
type t = {
mutable fmt : log_formatter;
mutable level : Easy_logging__.Logging_types.level;
mutable filters : filter list;
output : string -> unit;
}
Type of a handler
A handler is made of:
- a formatter that transforms a log item into a string.
- a level used to filter out items.
- an array of possible additional custom filters.
- an
output
function, that takes a string and does the output job.
Handlers creation helpers
Module to create handlers that output
to stdout or stderr
.
Module to create handlers that output to a file.
Used for quick handler creation, e.g.
Cli handler: outputs colored messages to stdout
let h = Handlers.make (Cli Debug)
File handler : outputs messages to a given file
let h = Handlers.make (File ("filename", Debug))
Handlers setup
Sets the formatter of a handler.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page