Library
Module
Module type
Parameter
Class
Class type
Lucid
is a super simple logging library.
val level_to_string : level option -> string
Converts Level to String
val level_to_int : level option -> int
Converts Level to Int
Debug -> 1
Info -> 2
Warn -> 3
Error -> 4
Fatal -> 5
val set_level : level -> unit
set_level Warn
will set enable logging for Warn
and the levels above it.
val get_level : unit -> level
Returns the lowest level being logged.
val set_tz : timezone -> unit
set_tz GMT
will set the timestamp timezone to GMT.
val get_tz : unit -> timezone
Returns the timezone being used for the timestamp.
val set_out_channel : out_channel -> unit
val get_out_channel : unit -> out_channel
Set foreground color of the logging label for a certain level.
Set background color of the logging label for a certain level.
val get_color : level -> string * string
get_color Error
will return a 2-tuple string * string
where the first string corresponds to the foreground color of the level Error
and second to the background color.
val get_count : level -> int
Gets the number of times a certain level has been successfully called to log.
val get_count_logged : level -> int
Gets the number of times a certain level has actually logged.
val get_count_unlogged : level -> int
get_count
- get_count_logged
val set_count : lvl:level -> int -> unit
val set_count_logged : lvl:level -> int -> unit