Module Make.Logging

type level =
  1. | Debug
  2. | Info
  3. | Notice
  4. | Warning
  5. | Error
  6. | Fatal

Logging levels. See docs/developer/guidelines.rst for their meaning

val log : level -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a

Logs a message. It is the shell's responsibility to manage the actual logging.

Even though logging may involve system calls, formatting, or other work, the shell guarantees that calling this function doesn't transfer control over another promise. Consequently, the performance of this function can be considered predictable from the point of view of gas-consumption.

Note that the function call has predictable performance, but that it is the caller's responsibility to ensure that argument evaluation has predictable performance too. E.g., log Notice "%s" (Format.asprint …) may spend time formatting the argument string.

val log_string : level -> string -> unit

Same as log but more efficient with a simpler interface.