Options.LoggerSourceThese predefined channels are flushed after each call and a newline character is inserted.
For messages that show a fatal failure, In this case, you should not be able to continue and exit code should follow the emission. Use error otherwise.
For error messages only.
For important results that will be displayed
For warning messages.
Any info that should be displayed
debug ~level:n msg will be displayed if at least level n + 1 debug is activated
fdebug ~level f acts like like debug ~level msg where msg = f () but lazily evaluates its argument. Use fdebug instead of debug if you need to print values that might be hard to compute (and that you therefore compute inside the closure).
set_tagged_entry Print channel identifiers, like warning for the warning channel, in front of messages to explicit their origins.
If might not be necessary if you use colors for example.
Set logger to display only messages from that channel and those with higher loglevels.
Valid arguments in increasing order of loglevels are : "debug", "info", "warning", "error", "fatal"/"result".
You cannot turn off fatal_channel or result_channel.
set_channel_color b chan activates (if b is true) or deactivates (if b is false) the emission of ANSI color tags for terminal.
You might want to deactivate the feature if you plan on analyzing the log in a file for example.
Activate color tags rendering on all outputs.
In your format strings, tags of the form "\@\{<color>format\@\}" will thus be interpreted.
color can be any of the following:
format is any format string recognized by Format. For example, after activating color tags Format.printf "\@\{<purple>Hello!\@\}" will write "Hello!" in purple if your terminal has such features.