package codex
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=bc7266a140c6886add673ede90e335d3
sha512=8da42c0ff2c1098c5f9cb2b5b43b306faf7ac93b8f5ae00c176918cee761f249ff45b29309f31a05bbcf6312304f86a0d5a000eb3f1094d3d3c2b9b4c7f5c386
doc/codex.tracelog/Tracelog/index.html
Module TracelogSource
Tracelog is the main logging module for codex.
Instanciate a new logger with Tracelog.Make:
module Log = Tracelog.Make(struct let category = "MyCategory" end)You can then use logging functions Log.error, Log.warning, Log.notice, Log.info, and Log.debug (in increasing verbosity level). Additionally, Log.fatal prints and exits. Finally, Log.trace can be used to trace entry/return into a function.
For a short tutorial, see Tracelog Debugging in Codex.
You can change the global level using set_verbosity_level (set to `Notice by default).
A function that behaves like printf.
A log message takes a printf function and print with it. This avoid the need to parse and evaluate arguments when we do not log.
Verbosity level, from less to most verbose. Default is to display everything below `Warning. Feedback levels are from less to more verbose (normal levels are from 0 to 2, but you can pass bigger numbers.)
reset the location stack, USE ONLY IF YOU KNOW WHAT YOU ARE DOING
The current stack of locations set by trace.
If we have location information, it will be printed using this function.
Standard functor: verbosity level is controlled by set_verbosity_level.
This is useful when developping and debugging a specific module: we can enable debugging forthis module by replacing the Make call by MakeDebug.
Completely silence this debug output.