typelevel= |Debug(*Debugging message. They can be automatically removed by the
syntax extension. *) |Info(*Informational message. Suitable to be displayed when the
program is in verbose mode. *) |Notice(*Same as Info, but is displayed by default. *) |Warning(*Something strange happend *) |Error(*An error message, which should not means the end of the
program. *) |Fatal(*A fatal error happened, in most cases the program will end
after a fatal error. *)

Type of log levels. A level determines the importance of a
message

typelogger

Type of a logger. A logger is responsible for dispatching messages
and storing them somewhere.

Lwt provides loggers sending log messages to a file, syslog,
... but you can also create you own logger.

typesection

Each logging message has a section. Sections can be used to
structure your logs. For example you can choose different
loggers according to the section.

Each section carries a level, and messages with a lower log
level than than the section level will be dropped.

Section levels are initialised using the LWT_LOG environment
variable, which must contains one or more rules of the form
pattern -> level separated by ";". Where pattern is a string
that may contain *.

For example, if LWT_LOG contains:

access->warning;foo[*]->error

then the level of the section "access" is Warning and the
level of any section matching "foo[*]" is Error.

If the pattern is omited in a rule then the pattern "*" is
used instead, so LWT_LOG may just contains "debug" for
instance.

If LWT_LOG is not defined then the rule "* -> notice" is
used instead.

add_rule pattern level adds a rule for sections logging
levels. The rule is added before all other rules. It takes
effect immediatly and affect all sections for which the level
has not been set explicitly with Lwt_log.​Section.​set_level. pattern
may contains *. For example: