Package adams.flow.standalone.logevent
Class NameFilter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.standalone.logevent.AbstractLogRecordFilter
-
- adams.flow.standalone.logevent.NameFilter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class NameFilter extends AbstractLogRecordFilter
Filters records based on regular expression applied to logger name.
Valid options are:
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-regexp <adams.core.base.BaseRegExp> (property: regExp) The regular expression that the logger name must match. default: .*
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseRegExp
m_RegExp
the regular expression to apply to the logger name.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description NameFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptRecord(LogRecord record)
Returns whether the log record is accepted or not for further processing.void
defineOptions()
Adds options to the internal list of options.BaseRegExp
getRegExp()
Returns the regular expression to match the logger name against.String
globalInfo()
Returns a string describing the object.String
regExpTipText()
Returns the tip text for this property.void
setRegExp(BaseRegExp value)
Sets the regular expression to match the logger name against.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_RegExp
protected BaseRegExp m_RegExp
the regular expression to apply to the logger name.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setRegExp
public void setRegExp(BaseRegExp value)
Sets the regular expression to match the logger name against.- Parameters:
value
- the expression
-
getRegExp
public BaseRegExp getRegExp()
Returns the regular expression to match the logger name against.- Returns:
- the expression
-
regExpTipText
public String regExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
acceptRecord
public boolean acceptRecord(LogRecord record)
Returns whether the log record is accepted or not for further processing.- Specified by:
acceptRecord
in classAbstractLogRecordFilter
- Parameters:
record
- the record to check- Returns:
- true if regular expression matches the
LogRecord.getLoggerName()
-
-