package owl-base

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

Module Owl_logSource

Log module provides logging functionality.

Type definition
Sourcetype 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 logging.

    *)
Configuration functions
Sourceval set_level : level -> unit

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

Sourceval set_output : out_channel -> unit

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

Sourceval set_color : bool -> unit

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

Log functions
Sourceval debug : ('a, out_channel, unit) format -> 'a

This function outputs log at DEBUG level.

Sourceval info : ('a, out_channel, unit) format -> 'a

This function outputs log at INFO level.

Sourceval warn : ('a, out_channel, unit) format -> 'a

This function outputs log at WARN level.

Sourceval error : ('a, out_channel, unit) format -> 'a

This function outputs log at ERROR level.

Sourceval fatal : ('a, out_channel, unit) format -> 'a

This function outputs log at FATAL level.

OCaml

Innovation. Community. Security.