This module provides functions to deal with logging. It extends [root:Lwt_log_core] with Unix features. It adds:
datewhich will be replaced with the current date
millisecondswhich will be replaced by the fractionnal part of the current unix time
"$(date) $(name)[$(pid)]: $(message)"
"$(date).$(milliseconds) $(name)[$(pid)]: $(message)"
"$(date): $(loc-file): $(loc-line): $(loc-column): $(message)"
Syslog facility. Look at the SYSLOG(3) man page for a description of syslog facilities
syslog ?template ?paths ~facility () creates an logger
which send message to the system logger.
"$(date) $(name)[$(pid)]: $(section): $(message)"
desf_file ?template ?mode ?perm ~file_name () creates an
logger which will write messages to
mode = `Truncatethen the file is truncated and previous contents will be lost.
mode = `Append, new messages will be appended at the end of the file
"$(date): $(section): $(message)"
channel ?template ~close_mode ~channel () creates a logger
from a channel.
close_mode = `Close then
channel is closed when the
logger is closed, otherwise it is left open.
"$(name): $(section): $(message)"