Module type Signatures.LOG

Module for modulating the logging output with the logging level.

val level : int ref

Current logging (debugging) level.

val dprintf : int -> ('aFormat.formatter, unit) format -> 'a

dprintf level fmt args... formats the logging information fmt with the arguments args... on the logging output if the logging level is greater than or equal to level. The default level is 1. More obscure debugging information should have a higher logging level. Your formats are wrapped inside these two formats "@[<2>" and "@]@.".

val is_logging : int -> bool
  • returns

    whether logging at this level will print anything

val eprintf : ('aFormat.formatter, unit) format -> 'a

Equivalent to calling dprintf with a level < 0.

val raw_dprintf : int -> ('aFormat.formatter, unit) format -> 'a

Same as dprintf but without the format wrapping.