package orsetto
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=151ca6df499bd3de7aa89a4e1627411fbee24c4dea6e0e71ce21f06f181ee654
md5=00393728b481c2bf15919a8202732335
doc/orsetto.cf/Cf_journal/index.html
Module Cf_journal
Diagnostic event journaling (basis).
Overview
This module defines the core module types of a lightweight foundation for diagnostic event journaling, similar to the core Java classes in the Log4j project from the Apache Foundation.
The core interface of the
f_journal
module is functorial, and is intended for extensibility.
Functorial Interface
module type Profile = sig ... end
A profile of diagnostic event journaling module.
Use Create(P)
to create journaling module with priority ordering 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 'level basic_prioritizer : [> Basic.level ] as 'level Basic.prioritizer
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
. Derive a subclass to define a prioritizer for additional priority levels corresponding to other integer codes.
class 'event basic_channel_archiver : out_channel -> object ... end
The basic channel archiver. Use new basic_channel_archiver c
to construct an archiver that emits each basic event e
with a priority level less than `Fail
to the channel c
using Printf.fprintf c "%s: %s\n" e#prioritizer#tag e#message
.
class virtual 'archiver basic_agent : 'level basic_prioritizer -> 'level -> 'archiver list -> object ... end
The basic journaling agent. Derive a subclass to define an agent that can construct events derived from the basic event (which may also require archivers derived from the basic archiver that can format any additional required output). The class defines six public methods for output of diagnostic events, one for each basic priority level.
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.