net.sourceforge.acelogger.level.filter
Class EqualsLevelFilter

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

public class EqualsLevelFilter
extends BaseLevelFilter

A filter that matches an exact level.

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

Constructor Summary
EqualsLevelFilter(String identifier)
          Constructs a new filter to make exact matches of levels.
EqualsLevelFilter(String identifier, LogLevel desiredLevel)
          Constructs a new filter to make exact matches of levels.
 
Method Summary
 LogLevel getDesiredLevel()
          Gets the desired level of this filter.
 boolean isSuitable(LogLevel level)
          Verifies if a log level is suitable for a determined logger.
 void setDesiredLevel(LogLevel desiredLevel)
          Sets the desired 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

EqualsLevelFilter

public EqualsLevelFilter(String identifier)
Constructs a new filter to make exact matches of levels. The level used is the one defined by LevelFilterConstants.DEFAULT_LEVEL.

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

EqualsLevelFilter

public EqualsLevelFilter(String identifier,
                         LogLevel desiredLevel)
Constructs a new filter to make exact matches of levels.

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

getDesiredLevel

public final LogLevel getDesiredLevel()
Gets the desired level of this filter.

Returns:
The desired level.
Since:
1.0.0

setDesiredLevel

public final void setDesiredLevel(LogLevel desiredLevel)
Sets the desired level of this filter.

Parameters:
desiredLevel - The desired 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.