# Module Cf_journal

    module Cf_journal: sig .. end

Diagnostic event journaling.

Overview

This module implements a lightweight foundation for diagnostic event journaling, similar to the core Java classes in the Log4j project from the Apache Foundation.

The core interface is functorial, and is intended for extensibility. An additional interface is provided for simplicity of use in the common case of journaling diagnostic messages to `Pervasives.out_channel` objects, e.g `stdout` and `stderr`.

Functorial Interface

The type of the module produced the `Create(P: Cf_ordered.Total_T)` functor defined below.

    module type T = sig .. end

    module Create: functor (P : Cf_ordered.Total_T) -> T  with module Priority = P

A functor that produces a module of type `T` that defines extensible diagnostic event journaling with messages prioritized by codes in the total order defined by the module `P`.

Basic Interface

    module Basic: sig .. end

A module defining basic diagnostic event journaling with a simple set of priority levels associated to integer priority codes.

    class [[> Basic.level ]] basic_prioritizer : object .. end

The basic prioritizer class, defining the priority codes and message tags for all of the basic priority levels: ``Invalid`, ``Fail`, ``Error`, ``Warn`, ``Info` and ``Debug`.

    class [[> Basic.level ] #Basic.event] basic_channel_archiver : Stdlib.out_channel -> object .. end

The basic channel archiver.

    class virtual [[> Basic.level ] #Basic.event #Basic.archiver] basic_agent : ([> Basic.level ] as 'a) #basic_prioritizer -> 'a -> ('a #Basic.event #Basic.archiver as 'b) list -> object .. end

The basic journaling agent.

    type t = Basic.level Basic.event Basic.archiver
           basic_agent

The type of the most basic agent, used for `stdout` and `stderr` below.

    val stdout : t

A basic agent, initially set with a limit of ``Notice`, and with with one basic archiver for the `Pervasives.stdout` channel.

    val stderr : t

A basic agent, initially set with a limit of ``Notice`, and with with one basic archiver for the `Pervasives.stderr` channel.