package vlt

  1. Overview
  2. Docs

This module is responsible for the management of loggers, stored in a tree.

type logger_info = {
  1. name : Name.t;
    (*

    Logger name.

    *)
  2. level : Level.t;
    (*

    Logger level, filtering events with a greater level.

    *)
  3. filter : Filter.t lazy_t;
    (*

    Logger filter, selecting events to record.

    *)
  4. pass : Filter.t lazy_t;
    (*

    Logger pass filter, selecting events to record.

    *)
  5. layout : Layout.t lazy_t;
    (*

    Logger layout, defining how events are recorded.

    *)
  6. mode : Mode.t;
    (*

    Logger mode, defining when events are recorded.

    *)
  7. output : Output.impl lazy_t;
    (*

    Logger output, defining where events are recorded.

    *)
}

The type of loggers.

val register_logger : logger_info -> unit

Registers the passed logger, making it able to receive events.

val get_loggers : Name.t -> (Name.t * logger_info list) list

Returns the list of all loggers that may receive an event initially sent to the loggers whose name is passed. Each element of the returned list is a (n, l) couple where all loggers appearing in l are guaranteed to have a name equal to n.

val make_node : Name.t -> unit

Creates a node for holding loggers whose name is passed. Node are automatically created by calls to either register_logger, or get_loggers, hence calling make_node only performs the node creation earlier.

OCaml

Innovation. Community. Security.