Legend:
Library
Module
Module type
Parameter
Class
Class type
Program log.
Support for program logging. Not to be used by build logic.
The module is modelled after Logs logging, see this quick introduction. It can be made to log on a Logs source, see here.
FIXME This should maybe moved to B00_ui. Make the doc self contained (cf. references to Logs). OTOH it's nice to simply open B0_std and be done.
Reporting levels
type level =
| Quiet
| App
| Error
| Warning
| Info
| Debug
The type for reporting levels. They are meant to be used as follows:
Quiet doesn't report anything.
App can be used for the standard output or console of an application. Using this instead of stdout directly allows the output to be silenced by Quiet which may be desirable, or not.
Error is an error condition that prevents the program from running.
Warning is a suspicious condition that does not prevent the program from running normally but may eventually lead to an error condition.
Info is a condition that allows the program user to get a better understanding of what the program is doing.
Debug is a condition that allows the program developer to get a better understanding of what the program is doing.
The type for client specified message formatting functions. See Logs.msgf.
header interpretation is up to the reported but None should automatially output headers that depend on the level and Some "" should not output any header leaving full control to the client.
time ~level m f logs m with level level (defaults to Info) and the time f () took as the log header.
Note. The current log level is determined after f has been called this means f can change it to affect the log operation. This allows f to be the main function of your program and let it set the log level.