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 =
  1. | F_pt
    (*

    Plain text

    *)
  2. | F_xml
    (*

    XML

    *)
  3. | F_json
    (*

    JSON

    *)
  4. | F_ijson
    (*

    Incremental JSON object stream

    *)
  5. | 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_log_format_ijson : unit -> unit

Set log format to incremental JSON

val print_json_sep : Stdlib.Format.formatter -> unit

Print the separator between JSON objects (could be nothing for incremental json, or comma for standard json)

val get_show_props : unit -> bool

Returns whether to show properties' constraints

val set_show_props : bool -> unit

Set whether to show properties' constraints

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