Module Log
module Log: sig end
The definitions for the event logger. It is used to log
debugging, error and informational messages. It should only be used
through the LOG
keyword introduced by the logifier.pl
preprocessor.
type severity =
| |
Emerg |
(* | This event needs a human intervention to recover. The
entire system is compromised and execution is
aborted. | *) |
| |
Alert |
(* | Something went wrong and at least one thread of execution
was not recovered. | *) |
| |
Error |
(* | Recovered error. Needs investigation. | *) |
| |
Warning |
(* | Something is fishy. Needs investigation. | *) |
| |
Exceptional |
(* | A secondary code flow. | *) |
| |
Config |
(* | Configuration setup of change. | *) |
| |
User |
(* | Used-invoked alteration. | *) |
| |
Info |
(* | Informational message. Something significant has
happened. | *) |
| |
Exec |
(* | Tracing the execution flow. | *) |
| |
Debug |
(* | Debugging information. | *) |
| |
Data |
(* | Parameter dumps. | *) |
The severity of a log event.
val protect : Mutex.t
Do not use - it is referenced only through the logifier.pl
preprocessing script.
val event : severity ->
int -> string -> ('a, Pervasives.out_channel, unit) format -> 'a
Do not use. Log.event sev count modu msg
will log message msg
with severity sev
, with a reference to module modu
and line number
count
. . See the module introduction.
val cur_log_level : severity Pervasives.ref
Used to set the current logging level. Can be changed at any
time.
val log_out : Pervasives.out_channel
The channel where we print the log messages. Do not use - it is
referenced only through the logifier.pl
script.
val log_from_string : string -> unit
Set the cur_log_level
according to the string passed as
parameter, which should be a representation of the log levels defined
above. Raises a Failure
if the parameter is not a valid string
representation of a log level.
val cmp : severity -> bool
Do not use. Calling cmp s
returns true is the severity s
is
higher than the current log level, false otherwise. This is used by
the preprocessor for logging purposes - it should not be called
directly.