package owl-base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Log module provides logging functionality.

Type definition
type level =
  1. | DEBUG
  2. | INFO
  3. | WARN
  4. | ERROR
  5. | FATAL
    (*

    Type definition of log levels, priority is from low to high. Using ``set_level`` function to set global logging level to high one can mask the output from low level loggging.

    *)
Configuration functions
val set_level : level -> unit

This function sets the global logging level. Low level logging will be omitted.

val set_output : Stdlib.out_channel -> unit

This function sets the channel for the logging output. The default one is the standard output.

val set_color : bool -> unit

``set_color true`` turns on the colour; ``set_color false`` turns it off.

Log functions
val debug : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

This function outputs log at ``DEBUG`` level.

val info : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

This function outputs log at ``INFO`` level.

val warn : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

This function outputs log at ``WARN`` level.

val error : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

This function outputs log at ``ERROR`` level.

val fatal : ('a, Stdlib.out_channel, unit) Stdlib.format -> 'a

This function outputs log at ``FATAL`` level.

OCaml

Innovation. Community. Security.