net.sourceforge.acelogger.level.filter
Class NotEqualLevelFilter

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

public class NotEqualLevelFilter
extends BaseLevelFilter

A filter that doesn't matches an exact level.

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

Constructor Summary
NotEqualLevelFilter(String identifier)
          Constructs a new filter to exclude exact matches of log levels.
NotEqualLevelFilter(String identifier, LogLevel undesiredLevel)
          Constructs a new filter to exclude exact matches of log levels.
 
Method Summary
 LogLevel getUndesiredLevel()
          Gets the undesired level of this filter.
 boolean isSuitable(LogLevel level)
          Verifies if a log level is suitable for a determined logger.
 void setUndesiredLevel(LogLevel undesiredLevel)
          Sets the undesired 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

NotEqualLevelFilter

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

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

NotEqualLevelFilter

public NotEqualLevelFilter(String identifier,
                           LogLevel undesiredLevel)
Constructs a new filter to exclude exact matches of log levels.

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

getUndesiredLevel

public final LogLevel getUndesiredLevel()
Gets the undesired level of this filter.

Returns:
The undesired level.
Since:
1.0.0

setUndesiredLevel

public final void setUndesiredLevel(LogLevel undesiredLevel)
Sets the undesired level of this filter.

Parameters:
undesiredLevel - The undesired 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.