package orsetto

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

The base class for journaling agents. Use inherit agent p v s to derive a subclass that defines the private event_ method to construct an event object with a priority level and a message text using the prioritizer p. Sets the initial priority code minimum to v, and the initial list of archivers to s.

constraint 'event = 'level event
constraint 'archiver = 'event archiver
val mutable archivers_ : 'archiver list

The current list of archivers that journal events from this agent.

val mutable limit_ : P.t

The minimum priority code for a diagnostic event to be constructed and passed to the archivers.

method private virtual event : 'level -> string -> 'event

Define the private event method to construct an event object with a priority level and a message text.

method setlimit : 'level -> unit

Use a#setlimit v to set the minimum priority code to the code corresponding to the priority level v.

method enabled : 'level -> bool

Use a#enabled v to test whether the priority code corresponding to the priority level v is preceded in the total order by the minimum priority code.

method private put : 'a 'b. 'level -> ('event -> 'b) -> ('a, unit, string, string, string, 'b) format6 -> 'a

Use this method in level-specific methods of the derived class for constructing events and putting them to archivers. Use super#put v c to construct a function that takes a format string (and arguments thereby specified) and, if self#enabled v returns true then calls self#event v m (where m is the message text given to the continuation provided to Printf.kprintf), iterates on archivers_ invoking the emit method for each one with the constructed event, and finally passing the event to the continuation c. The value returned by c is returned by the method when invoked with a format string (and associated arguments).

OCaml

Innovation. Community. Security.