com.resilientedge.util.logger
Interface Filter

All Known Implementing Classes:
TopicLevelFilter, LevelFilter

public interface Filter

A Filter is used to regulate the levels of log records that are logged. To facilitate dynamic access of properties (such as the levels the logger should be allowed to log) the Filter holds a reference to it's assigned logger. In this way, the filter is able to ask its logger for whatever variables the Filter requires to do its job.

Author:
odh

Method Summary
 Logger getLogger()
          The implementation of this method returns the Logger to which the filter belongs.
 boolean isLoggable(LogRecord logRecord)
          Defines a method used to determine if the supplied log record can pass through the filter.
 void setLogger(Logger logger)
          The implementation of this method assigns the Logger to which the filter belongs.
 

Method Detail

isLoggable

public boolean isLoggable(LogRecord logRecord)
Defines a method used to determine if the supplied log record can pass through the filter.
Parameters:
logRecord - the logRecord used to determine log-ability.
Returns:
true if logRecord should be logged.

setLogger

public void setLogger(Logger logger)
The implementation of this method assigns the Logger to which the filter belongs.
Parameters:
logger - The Logger to which this Filter belongs.

getLogger

public Logger getLogger()
The implementation of this method returns the Logger to which the filter belongs.
Returns:
The Filter's Logger


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.