org.jcoderz.commons.logging
Class LevelFilter

java.lang.Object
  extended by org.jcoderz.commons.logging.LevelFilter
All Implemented Interfaces:
Filter

public class LevelFilter
extends Object
implements Filter

This filter is used for filtering log messages according to the logger level.


Constructor Summary
LevelFilter(List levels)
          Creates a new instance of this and sets the logging levels, which will pass this filter.
 
Method Summary
 boolean isPassable(LogItem entry)
          Returns flag whether the filter lets the log file entry pass, i.e. the entry matches the filter criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LevelFilter

public LevelFilter(List levels)
Creates a new instance of this and sets the logging levels, which will pass this filter. All levels within the supplied list must be given in their textual representation.

Parameters:
levels - The list storing passable logger levels in their textual representation.
Method Detail

isPassable

public boolean isPassable(LogItem entry)
Returns flag whether the filter lets the log file entry pass, i.e. the entry matches the filter criteria.

Specified by:
isPassable in interface Filter
Parameters:
entry - The entry to check.
Returns:
true, if entry passes the filter; false, else.


Copyright 2007 The jCoderZ Project.