© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com

com.bitfactoryinc.logging
Class LogEntryFilter

java.lang.Object
  |
  +--com.bitfactoryinc.logging.LogEntryFilter
Direct Known Subclasses:
LogEntryCategoryFilter, LogEntryPassFilter

public abstract class LogEntryFilter
extends java.lang.Object
implements LoggingConstants

Concrete subclasses of this abstract class are used by loggers to "filter" each item and decide whether or not to actually log it. Subclasses should override the canPass(LogEntry) method.


Field Summary
private  int severityThreshold
           
 
Fields inherited from interface com.bitfactoryinc.logging.LoggingConstants
CRITICAL, DEBUG, ERROR, FATAL, INFO, severities, STATUS, WARNING
 
Constructor Summary
LogEntryFilter()
           
 
Method Summary
protected abstract  boolean canPass(LogEntry aLogEntry)
          Concrete subclasses should override this method, returning true if aLogEntry "passes" the filter (i.e.
 int getSeverityThreshold()
           
 void setSeverityThreshold(int newSeverityThreshold)
           
protected  boolean shouldLog(LogEntry aLogEntry)
          This method returns true if aLogEntry should be logged according to the receiver
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

severityThreshold

private int severityThreshold
Constructor Detail

LogEntryFilter

public LogEntryFilter()
Method Detail

canPass

protected abstract boolean canPass(LogEntry aLogEntry)
Concrete subclasses should override this method, returning true if aLogEntry "passes" the filter (i.e. aLogEntry should be logged).

getSeverityThreshold

public int getSeverityThreshold()

setSeverityThreshold

public void setSeverityThreshold(int newSeverityThreshold)

shouldLog

protected final boolean shouldLog(LogEntry aLogEntry)
This method returns true if aLogEntry should be logged according to the receiver

© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com