Module Message_templates.Level

Log levels ordered by severity (lowest to highest)

type t =
  1. | Verbose
    (*

    0 - Most detailed, rarely enabled

    *)
  2. | Debug
    (*

    1 - Internal system events

    *)
  3. | Information
    (*

    2 - Normal operational messages (default)

    *)
  4. | Warning
    (*

    3 - Suspicious or degraded conditions

    *)
  5. | Error
    (*

    4 - Functionality unavailable

    *)
  6. | Fatal
    (*

    5 - System failure, needs immediate attention

    *)
val to_int : t -> int

Convert level to integer for ordering

val of_string : string -> t option

Convert level from string (case-insensitive)

val to_string : t -> string

Convert level to full string

val to_short_string : t -> string

Convert level to short 3-character string

val compare : t -> t -> int

Compare two levels (returns negative if first < second)

val (>=) : t -> t -> bool

Check if level a is greater than or equal to level b

val (<) : t -> t -> bool

Check if level a is less than level b

val (>) : t -> t -> bool

Check if level a is greater than level b

val (<=) : t -> t -> bool

Check if level a is less than or equal to level b

val (=) : t -> t -> bool

Check if two levels are equal

val (<>) : t -> t -> bool

Check if two levels are not equal