package nloge

  1. Overview
  2. Docs

Module Nloge.LevelSource

Sourcetype t = [
  1. | `Emergency
  2. | `Alert
  3. | `Critical
  4. | `Error
  5. | `Warning
  6. | `Notice
  7. | `Info
  8. | `Debug
]

t represents syslog-style levels

Sourceval compare : t -> t -> Ppx_deriving_runtime.int
Sourcetype Effect.t +=
  1. | Get : t Effect.t

Get refers to the current logging level.

Sourceval get_level : unit -> t
Sourceval parse : string -> t option

parses upper, lower, and initial capital letter cases.

parse "DEBUG" = parse "debug" = parse "Debug" = Some `Debug
Sourceval pp : Format.formatter -> t -> unit

pp prints level with upper capital

pp Format.std_formatter `Debug (* -> DEBUG *)
Sourceval show : t -> string