Module type Log.Sig

type 'a log_printer = Lib.log_level -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
type 'a m_log_printer = Lib.kind_module -> 'a log_printer

Logging

val set_module : Lib.kind_module -> unit

Set module currently running

val get_module : unit -> Lib.kind_module

Get module currently running

type log_format =
| F_pt

Plain text

| F_xml

XML

| F_json

JSON

| F_relay

Relayed

Format of log messages

val get_log_format : unit -> log_format

Returns the log format

val set_log_format : log_format -> unit

Chooses the log format

val set_log_format_pt : unit -> unit

Set log format to plain text

val set_log_format_xml : unit -> unit

Set log format to XML

val set_log_format_json : unit -> unit

Set log format to JSON

val set_relay_log : unit -> unit

Relay log messages to invariant manager, takes printing function as argument for relay messages.

val unset_relay_log : unit -> unit

Cancel relaying of log messages

Auxiliary functions

val pp_print_kind_module_xml_src : Stdlib.Format.formatter -> Lib.kind_module -> unit
val print_xml_trailer : unit -> unit
val printf_xml : 'a m_log_printer
val printf_json : 'a m_log_printer
val parse_log_xml : Lib.log_level -> Lib.position -> string -> unit
val parse_log_json : Lib.log_level -> Lib.position -> string -> unit