package easy_logging
Module to log messages. Aimed at being both powerful and easy to use
Install
Dune Dependency
Authors
Maintainers
Sources
v0.8.1.tar.gz
md5=8d5dca598561d4922d20a00fade0a1da
sha512=f310cd2a9f3f64942baf32287267ddfe3212bcc5aa5a62c7b269809f586e2247d2d1adc4bd52cc3a9a7e6f769b9de090f8386a1bc764612ec91bf2a7d886ef0b
doc/easy_logging/Easy_logging/Handlers/index.html
Module Easy_logging.Handlers
Source
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