All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdsu.logging.LoggerImplementation

java.lang.Object
   |
   +----sdsu.logging.LoggerImplementation

public abstract class LoggerImplementation
extends Object
This is the abstract class for all logging classes in sdsu.logging. It defines a system for logging usage of programs. The only reason to use this class is to create a new logger implementation. To create a new logger implementation you need to: implement the public static method register() and the protected method processLogRequest( LoggerMessage ). The register method needs to create an instance of the logger, register it with the class Logger by calling Logger.register(), and return the logger instance. The processLogRequest method handles the actual processing of the message. You can overload this method based on the type of message. Note that Logger calls the method log( LoggerMessage ), which calls processLogRequest. This level of indirection is used by SelectiveLogger to filter log requests before they get to the actual logger.

The logging system is based on the logging pattern by Neil Harrison in Pattern Languages of Program Design 3 Eds Martin, Riehle, Buschman, 1998, pp 277-289.

Version:
1.0 18 January 1998
Author:
Roger Whitney (whitney@cs.sdsu.edu)
See Also:
LogMessage, Logger;, SelectiveLogger;, ScreenLogger;

Constructor Index

 o LoggerImplementation()

Method Index

 o log(LoggerMessage)
Add the LoggerMessage object to the log.
 o register()
All subclass must implement this method.
 o reset()
Resets logger.

Constructors

 o LoggerImplementation
 public LoggerImplementation()

Methods

 o register
 public static LoggerImplementation register()
All subclass must implement this method. The method should create an instance, register it with the Logger class by using Logger.register( ). Note the compiler does not force you to implement this method, but still do so.

 o log
 public void log(LoggerMessage message)
Add the LoggerMessage object to the log.

 o reset
 public void reset()
Resets logger. Suclasses define what this means. Not normally part of a logging system. This will allow log servers to rest log files for students that may not have direct access to the log file.


All Packages  Class Hierarchy  This Package  Previous  Next  Index