Module OgamlUtils.Log

Log system

This module provides a very simple log system to use with Ogaml

type level = Debug | Warn | Error | Info | Fatal
Enumeration of log message levels

Possible values

Debug
Warn
Error
Info
Fatal
type t
Type of a log
val create : ?output:out_channel -> ?debug:bool -> ?color:bool -> ?short:bool -> unit -> t
Creates a log
- output : output channel of log messages (defaults to stderr)
- debug : if false, debug messages will be ignored (defaults to true)
- color : if false, messages will not be colored (defaults to true)
- short : if true, timestamps will be shortened (defaults to false)
val stdout : t
Log to the standard output, that would be obtained by calling create ()
val log : t -> level -> ('a, out_channel, unit) format -> 'a
Logs a message
val debug : t -> ('a, out_channel, unit) format -> 'a
Logs a debug message
val warn : t -> ('a, out_channel, unit) format -> 'a
Logs a warn message
val error : t -> ('a, out_channel, unit) format -> 'a
Logs an error message
val info : t -> ('a, out_channel, unit) format -> 'a
Logs an info message
val fatal : t -> ('a, out_channel, unit) format -> 'a
Logs a fatal error message