Spoc_core.Logval level_to_int : level -> intLevel to int for comparison
val bit : component -> intval enable : component -> unitEnable a component
val disable : component -> unitDisable a component
val set_level : level -> unitSet log level
val component_of_string : string -> component optionval level_of_string : string -> level optionEnable from environment variable SAREK_DEBUG=transfer,kernel,... Use "*" or "all" to enable all components. A level (debug, info, warn, error) sets the level; naming a component without a level sets it to debug, so SAREK_DEBUG=kernel prints the kernel component's debug messages. Unknown words are ignored.
val is_enabled : component -> boolCheck if component is enabled
would_log level comp: a message at level on comp would be printed. Guard a call whose arguments cost something to compute with it.
val level_to_string : level -> stringLevel to string
val component_to_string : component -> stringComponent to string
Core logging function - printf style
val log_any_component : level -> string -> unitlog_any_component level msg: msg tagged All, gated by the level only. For callers with their own switch (Spoc_core.Error.log), so they need not enable every component.
val debug : component -> string -> unitConvenience functions - string based
val info : component -> string -> unitval warn : component -> string -> unitval error : component -> string -> unitval debugf :
component ->
('a, Stdlib.out_channel, unit, unit) Stdlib.format4 ->
'aConvenience functions - printf style
val infof :
component ->
('a, Stdlib.out_channel, unit, unit) Stdlib.format4 ->
'aval warnf :
component ->
('a, Stdlib.out_channel, unit, unit) Stdlib.format4 ->
'aval errorf :
component ->
('a, Stdlib.out_channel, unit, unit) Stdlib.format4 ->
'a