package scope

  1. Overview
  2. Docs

Module Scope.LoggingSource

logging.ml - Custom logging and error messages

Sourcetype log_type =
  1. | Log_None
  2. | Log_Debug
  3. | Log_Info
  4. | Log_Warning
  5. | Log_Error
  6. | Log_Critical

Represents the severity of a log statement

Sourceval _GLOBAL_LOG_LEVEL : log_type
Sourceval int_of_log : log_type -> int

Follows the order in the type definition, [0:5]

Sourcetype return_code = int * string

For exits, their appropriate return code and the message type

Sourceval rc_Ok : int * string
Sourceval rc_Error : int * string
Sourceval ansi_bold : string

ANSI encoding for bold text

Sourceval ansi_red : string

ANSI encoding for red text

Sourceval ansi_orange : string

ANSI encoding for orange text

Sourceval ansi_yellow : string

ANSI encoding for yellow text

Sourceval ansi_reset : string

ANSI encoding for plain text

Sourceval error_red : string

ANSI encoding for bold red text

Sourceval error_orange : string

ANSI encoding for bold orange text

Sourceval error_yellow : string

ANSI encoding for bold yellow text

Sourceval string_of_log : log_type -> string

Gets the string representation of a log_type

Sourceval fatal : (int * string) -> ('a, unit, string, 'b) format4 -> 'a

A fatal log statement that immediately exits the program

Sourceval _log : log_type -> ('a, unit, string, unit) format4 -> 'a

Prints log statements to stdout/stderr

Sourceval err : ('a, unit, string, unit) format4 -> 'a