Log.CONFIGThe type of logging configurations.
The mode used to open the log file if the destination is a Prelude.Log.dest.File.
Should be one of open_append or open_trunc.
If (signal <> None) then Make.reopen will be called upon receipt of this signal.
Typically used for log rotation with Sys.sighup.
A function that returns a timestamp that is printed as the first component of the log message.
The timestamp can be in any conceivable format (even one that's not a timestamp). You might use e.g. (Unix.time >> truncate >> string_of_int) for an unreadable but sortable timestamp; I would normally use (Unix.time >> Unix.localtime >> Time.(strftime w3c)).
If (something pid) the integer is presumed to be the pid of this process and is appended to myself in the traditional syslog style.
The usual value would be (Some Unix.getpid).
Example: if (myself = Some "myself") and (pid = Some (k 100)), then the log message will contain "myself[100]".
If (something line), this function will be applied to the text of the log message to quote any newlines, thus assuring that the log message will be one single line.
For example, you could simply convert newlines to spaces by using (String.replace "\n" " ").
Actually this function is simply composed with quote and can do anything you like.
This function is called to determine the global log level.
For example, any of Message.(of_ref, env, zero, or one) would be suitable.
See Message.message.
See Message.message.
See Message.message.
See Message.message.