Package dsto.dfc.logging

Framework for handling log messages.

See:
          Description

Interface Summary
LogListener  
 

Class Summary
FileLogger Prints selected log events to a file.
Log A basic application log.
LogEvent  
LogFilter A filter for LogEvent's.
LogMessageBuffer Stores log messages emitted by the system log.
ServletLogger Directs DFC log events to a servlet's logger.
 

Package dsto.dfc.logging Description

Framework for handling log messages. Use the Log class to issue log messages of various categories (Alarm, Warning, Trace, etc). Use LogMessageBuffer to store a set number of these log messages.

Examples

Emit messages to the log using either Log.add () or, more commonly, Log.info (), Log.warn (), Log.alarm (), etc. All the logging methods take a source object: this should be the object that is emitting the message (eg "this") - for static classes use ClassName.class (ie the Class for the object). eg to log an IO error
    try
    {
    } catch (IOException ex)
    {
      Log.alarm ("Failed to do some IO", this, ex);
    }
  
To send an info message
    Log.info ("Starting something", this);
  
To save log messages use a LogMessageBuffer.



Copyright © 2008 Commonwealth of Australia