module Log:Message logging.sig
..end
The default log level is 0, only messages logged at level 0 are output.
The default output destination is Format.std_formatter
.
val set_log_formatter : Format.formatter -> unit
val set_log_level : int -> unit
Invalid_argument
"negative level" if you attempt to set
the current log level to a negative valueval log : (Format.formatter -> 'a -> unit) -> int -> 'a -> unit
Log.log print level x
outputs x
using print
, if
level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_int : int -> int -> unit
Log.log_int level i
logs i
, if level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_float : int -> float -> unit
Log.log_float level j
logs j
, if level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_string : int -> string -> unit
Log.log_string level s
logs s
, if level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_bool : int -> bool -> unit
Log.log_bool level b
logs b
, if level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_time : int -> Time.time -> unit
Log.log_time level t
logs seconds of processor time since
t
, if level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_flush : int -> unit -> unit
Log.log_flush level ()
flushes the log output, if level
<= current log levelInvalid_argument
"negative level" if level
< 0val log_newline : int -> unit -> unit
Log.log_newline level ()
outputs a new line and flushes
the log output, if level
<= current log levelInvalid_argument
"negative level" if level
< 0