de.lmu.ifi.dbs.elki.logging
Class SelectiveFilter
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.logging.SelectiveFilter
- All Implemented Interfaces:
- Loggable, Filter
- Direct Known Subclasses:
- DebugFilter, ExceptionFilter, InfoFilter, MessageFilter, ProgressFilter, WarningFilter
public abstract class SelectiveFilter
- extends AbstractLoggable
- implements Filter
A selective filter filters exactly for a certain LogLevel
of LogRecord
s.
- Author:
- Arthur Zimek
Constructor Summary |
protected |
SelectiveFilter(Level selectedLevel)
Provides a selective filter for the given level. |
Method Summary |
Level |
getLevel()
Returns the currently set level of selection. |
boolean |
isLoggable(LogRecord record)
Decides whether or not the given LogRecord is loggable. |
void |
setLevel(Level selectedLevel)
Sets the selected level
to the specified level. |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
selectedLevel
private Level selectedLevel
- The level to filter for.
SelectiveFilter
protected SelectiveFilter(Level selectedLevel)
- Provides a selective filter for the given level.
- Parameters:
selectedLevel
- the level to filter for
setLevel
public void setLevel(Level selectedLevel)
- Sets the selected level
to the specified level.
- Parameters:
selectedLevel
- the level to filter for
getLevel
public Level getLevel()
- Returns the currently set level of selection.
- Returns:
- the currently set level of selection
isLoggable
public boolean isLoggable(LogRecord record)
- Decides whether or not the given LogRecord is loggable.
Generally, a LogRecord is loggable
iff the level of
record
equals the
selectedLevel
.
More generous decisions may be implemented by extending classes.
- Specified by:
isLoggable
in interface Filter
- Returns:
- true if the level of
record
equals the
selectedLevel
,
false otherwise - See Also:
Filter.isLoggable(java.util.logging.LogRecord)