Log.Default
A default logging configuration
See CONFIG for details.
CONFIG
Typical usage is to customize it by module inclusion, e.g.:
module Config = struct include Default let myself = Some "NAME" end
val mylevel : int Stdlib.ref
mylevel is ref 0.
mylevel
ref 0
val level : unit -> int
level is (of_ref mylevel).
level
of_ref
val timestamp : 'a option
timestamp is None (no timestamp).
timestamp
None
val pid : 'a option
pid is None (no pid).
pid
val line : (string -> string) option
line assures single-line log messages by changing newlines to spaces.
line
val signal : 'a option
signal is None i.e. not to re-open the log in response to any signal.
signal
val mode : Stdlib.open_flag
mode is Open_append so that a restarted daemon doesn't clobber old logs.
mode
Open_append
val myself : string Option.t
myself is the basename of argv0.
myself
argv0
val flush : bool
flush is true i.e. to flush each logged message to ensure no log data is lost.
flush
true
val sep : string
sep is ": ".
sep
": "
val quote : 'a option
quote is None i.e. not to quote occurrences of sep in the logged data.
quote