Avalon LogKit Plugin

Standard LogTarget

Factory Description
Console

The Console LogTarget provides support for the logging of message to a console via System.out or System.err. If no logging targets are defined, the implementation will establish a default console target.

Example

    <stream id="standard">
       <name>System.out</name>
       <format type="console"/>
    </stream>
Rotating File

The rotating file target provides support for a set of rotation strategies including rotation by size, rotation on data, and combined date/size rotation scenarios.

Example

    <file id="simple">
      <filename>simple.log</filename>
      <append>true</append>
      <rotation type="revolving" init="1" max="10">
        <size>100k</size>
      </rotation>
    </file>
Multlipex

The multiplex target is a target that handles the redirection of a logging event to one or more log targets. This target is typically used in conjuction with different filters to control and qualify the information presented to different targets. For example, an application my configure a console target with summary warning and error reports to console, and a detailed error logg with full stack trace to a rotating file target. The multiplex target enabled the declaration of a single logical target and the subsequent formatting and generation of log message appropriate for the relative targets.

Example

    <multicast id="multicast">
      <targetref id="standard"/>
      <targetref id="simple"/>
    </multicast>
Plugin

The plugin target provides support for plugable log targets. A typical plugin log target is defined using <target> element.

Several plugable log targets are currently available.

Plugin Description
DataGram

A datagram log target.

avalon-logging/avalon-logkit-datagram#1.0-SNAPSHOT

    <target id="datagram"
        artifact="avalon-logging/avalon-logkit-datagram#1.0-SNAPSHOT">
      <address hostname="localhost" port="0"/>
    </target>
Socket

A socket log target.

avalon-logging/avalon-logkit-socket#1.0-SNAPSHOT

Syslog

A syslog log target.

avalon-logging/avalon-logkit-syslog#1.0-SNAPSHOT

    <target id="syslog"
        artifact="avalon-logging/avalon-logkit-syslog#1.0-SNAPSHOT">
      <address hostname="localhost" port="514" facility="USER"/>
      <format type="avalon"/>
    </target>
SMTP

An SMTP log target (available on request).

avalon-logging/avalon-logkit-smtp#1.0-SNAPSHOT

    <target id="smtp"
        artifact="avalon-logging/avalon-logkit-smtp#1.0-SNAPSHOT">
      <to>mcconnell@osm.net</to>
      <from>info@dpml.net</from>
      <subject>logging target test</subject>
      <maximum-size>1</maximum-size>
      <session>
      </session>
    </target>