Module Log.Default

A default logging configuration

See CONFIG for details.

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.

val level : unit -> int

level is (of_ref mylevel).

val timestamp : 'a option

timestamp is None (no timestamp).

val pid : 'a option

pid is None (no pid).

val line : (string -> string) option

line assures single-line log messages by changing newlines to spaces.

val signal : 'a option

signal is None i.e. not to re-open the log in response to any signal.

val mode : Stdlib.open_flag

mode is Open_append so that a restarted daemon doesn't clobber old logs.

val myself : string Option.t

myself is the basename of argv0.

val flush : bool

flush is true i.e. to flush each logged message to ensure no log data is lost.

val sep : string

sep is ": ".

val quote : 'a option

quote is None i.e. not to quote occurrences of sep in the logged data.