package lambdapi

  1. Overview
  2. Docs

Functions for creating loggers. *

val log_enabled : unit -> bool

log_enabled is the cached result of whether there exists an enabled logging function. Its main use is to guard logging operations to avoid performing unnecessary computations.

type logger_pp = {
  1. pp : 'a. 'a Lplib.Base.outfmt -> 'a;
}

Type of a logging function. It needs to be boxed for higher-rank polymorphism reasons

val make : char -> string -> string -> logger_pp

make key name desc registers a new logger and returns its pp.

val set_debug : bool -> string -> unit

set_debug value key enables or disables the loggers corresponding to every character of str according to value.

val set_default_debug : string -> unit

set_default_debug str declares the debug flags of str to be enabled by default.

val get_activated_loggers : unit -> string

get_activated_loggers () fetches the list of activated loggers, listed in a string

val reset_loggers : ?default:string -> unit -> unit

reset_loggers () resets the debug flags to those by default.

val log_summary : unit -> (char * string) list

log_summary () gives the keys and descriptions for logging options.