Module Log
Logging and messaging
module type Sig = sig ... endLogging functions accessible directly
include Sig
type 'a log_printer= Lib.log_level -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'atype 'a m_log_printer= Lib.kind_module -> 'a log_printer
Logging
val set_module : Lib.kind_module -> unitSet module currently running
val get_module : unit -> Lib.kind_moduleGet module currently running
val get_log_format : unit -> log_formatReturns the log format
val set_log_format : log_format -> unitChooses the log format
Auxiliary functions
val pp_print_kind_module_xml_src : Stdlib.Format.formatter -> Lib.kind_module -> unitval print_xml_trailer : unit -> unitval printf_xml : 'a m_log_printerval printf_json : 'a m_log_printerval parse_log_xml : Lib.log_level -> Lib.position -> string -> unitval parse_log_json : Lib.log_level -> Lib.position -> string -> unit
module type SLog = sig ... endmodule Make : functor (R : sig ... end) -> SLogCreate a logging module parameterized by a relay function
One instance without relay is available directly
include SLog
val log : 'a log_printerlog m l f v ...outputs a message from modulemon levell, formatted with the parameterized stringfand the valuesv ...
val log_uncond : ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'alog_uncond m f v ...outputs a message from modulemunconditionally, formatted with the parameterized stringfand the valuesv ...
val log_result : (Stdlib.Format.formatter -> 'a -> unit) -> (Stdlib.Format.formatter -> 'a -> unit) -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> unitlog_result pt xml json aoutputs a result (for instance, for a post analysis) by choosing the right printing function depending on the output format