net.sourceforge.acelogger.level.filter
Class LessOrEqualLevelFilter

java.lang.Object
  extended by net.sourceforge.acelogger.level.filter.BaseLevelFilter
      extended by net.sourceforge.acelogger.level.filter.LessOrEqualLevelFilter
All Implemented Interfaces:
Identifiable, LevelFilter

public class LessOrEqualLevelFilter
extends BaseLevelFilter

A filter that matches levels less or equal the supplied one.

Since:
1.0.0
Version:
1.0.0
Author:
Zardi (https://sourceforge.net/users/daniel_zardi)

Constructor Summary
LessOrEqualLevelFilter(String identifier)
          Constructs a new filter that matches levels less or equal the supplied one.
LessOrEqualLevelFilter(String identifier, LogLevel maximumLevel)
          Constructs a new filter that matches levels less or equal the supplied one.
 
Method Summary
 LogLevel getMaximumLevel()
          Gets the maximum level of this filter.
 boolean isSuitable(LogLevel level)
          Verifies if a log level is suitable for a determined logger.
 void setMaximumLevel(LogLevel maximumLevel)
          Sets the maximum level of this filter.
 
Methods inherited from class net.sourceforge.acelogger.level.filter.BaseLevelFilter
getIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LessOrEqualLevelFilter

public LessOrEqualLevelFilter(String identifier)
Constructs a new filter that matches levels less or equal the supplied one. The level used is the one defined by LevelFilterConstants.DEFAULT_LEVEL.

Parameters:
identifier - The name of this filter.
Since:
1.0.0

LessOrEqualLevelFilter

public LessOrEqualLevelFilter(String identifier,
                              LogLevel maximumLevel)
Constructs a new filter that matches levels less or equal the supplied one.

Parameters:
identifier - The name of this filter.
maximumLevel - The desired level for this filter.
Since:
1.0.0
Method Detail

getMaximumLevel

public final LogLevel getMaximumLevel()
Gets the maximum level of this filter.

Returns:
The maximum level.
Since:
1.0.0

setMaximumLevel

public final void setMaximumLevel(LogLevel maximumLevel)
Sets the maximum level of this filter.

Parameters:
maximumLevel - the maximum level to set.
Since:
1.0.0

isSuitable

public boolean isSuitable(LogLevel level)
Verifies if a log level is suitable for a determined logger.

Parameters:
level - The log level to test.
Returns:
True if the logger accepts this level; False otherwise.


Copyright © 2007-2010 The AceLogger Team. All Rights Reserved.