Holger's
Java API

com.antelmann.util.logging
Class LevelFilter

java.lang.Object
  extended by com.antelmann.util.logging.LevelFilter
All Implemented Interfaces:
Filter<LogEntry>

public class LevelFilter
extends Object
implements Filter<LogEntry>

filters LogEntry objects by their level using the natural order of Level objects

Author:
Holger Antelmann
See Also:
Level

Field Summary
static Filter<LogEntry> MORE_THAN_FINE_LEVEL_FILTER
          accepts LogEntry objects that compare to more than the FINE level.
static Filter<LogEntry> NO_FINE_LEVEL_FILTER
          accepts LogEntry objects that exclude the levels FINE, FINER, FINEST.
 
Fields inherited from interface com.antelmann.util.Filter
EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER
 
Constructor Summary
LevelFilter(int importance)
           
LevelFilter(Level minLevel)
           
 
Method Summary
 boolean accept(LogEntry entry)
          returns true only if the Level of the entry is equal or comes after the configured Level of this filter.
 int getMinLevel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_FINE_LEVEL_FILTER

public static final Filter<LogEntry> NO_FINE_LEVEL_FILTER
accepts LogEntry objects that exclude the levels FINE, FINER, FINEST.


MORE_THAN_FINE_LEVEL_FILTER

public static final Filter<LogEntry> MORE_THAN_FINE_LEVEL_FILTER
accepts LogEntry objects that compare to more than the FINE level.

Constructor Detail

LevelFilter

public LevelFilter(Level minLevel)

LevelFilter

public LevelFilter(int importance)
Method Detail

getMinLevel

public int getMinLevel()

accept

public boolean accept(LogEntry entry)
returns true only if the Level of the entry is equal or comes after the configured Level of this filter.

Specified by:
accept in interface Filter<LogEntry>


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads