package easy_logging
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Module to log messages. Aimed at being both powerful and easy to use
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.7.1.tar.gz
md5=ff59e729374d66cc927de16bd7b82dea
sha512=ca31fd39edab9a9592e9d5b2646dccc750037f823c4195de4b5ce4760e9463df1576806f850911ef96b359a45c35cc25f160860aa87b5519cf8b8feca8a68deb
doc/easy_logging/Easy_logging/Handlers/index.html
Module Easy_logging.Handlers
Default implementation of a Handlers module.
This is the Handlers module. It provides simple yet adaptable handlers implementation.
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
outputfunction, that takes a string and does the output job.
Handlers creation helpers
module CliHandler : sig ... endModule to create handlers that output to stdout or stderr.
module FileHandler : sig ... endModule to create handlers that output to a file.
val default_config : configUsed 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
val set_level : t -> Easy_logging__.Logging_types.level -> unitSets the level of a handler.
val set_formatter : t -> log_formatter -> unitSets the formatter of a handler.
val apply : t -> Easy_logging__.Logging_types.log_item -> unitAuxiliary function.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page