Module Level

module Level: sig .. end
This module defines the various levels of log, as well as some utility functions over levels.

type error = 
| Invalid_level_string of string
| Invalid_level_int of int
exception Exception of error
type t = 
| FATAL (*Level for errors leading to program termination.*)
| ERROR (*Level for errors handled by the program.*)
| WARN (*Level for for hazardous circumstances.*)
| INFO (*Level for coarse-grained information.*)
| DEBUG (*Level for debug information.*)
| TRACE (*Level for fine-grained information.*)
The type of logging levels.
val levels : t list
The list of all levels, in ascending order (i. e. from FATAL to TRACE).
val to_string : t -> string
Converts the passed level into a string.
val of_string : string -> t
Converts the passed string into a level. The string is converted from its uppercase form.

Raises Exception if the passed string is not valid.

val to_int : t -> int
Converts the passed level into an integer.
val of_int : int -> t
Converts the passed integer into a level.

Raises Exception if the passed integer is not valid.