Class LevelFilter

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class LevelFilter
    extends AbstractLogRecordFilter
    Filters records based on their logging level, i.e., if the fall in the specified min/max (inclusive).

    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
     
    -minimum <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: minimum)
        The minimum level to accept.
        default: SEVERE
     
    -maximum <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: maximum)
        The maximum level to accept.
        default: FINEST
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    LoggingHelper#levelToOutputType(java.util.logging.Level), Serialized Form
    • Field Detail

      • m_Minimum

        protected LoggingLevel m_Minimum
        the minimum level to accept.
      • m_Maximum

        protected LoggingLevel m_Maximum
        the maximum level to accept.
    • Constructor Detail

      • LevelFilter

        public LevelFilter()
    • Method Detail

      • setMinimum

        public void setMinimum​(LoggingLevel value)
        Sets the minimum level of records to accept.
        Parameters:
        value - the level
      • getMinimum

        public LoggingLevel getMinimum()
        Returns the minimum level of records to accept.
        Returns:
        the level
      • minimumTipText

        public String minimumTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMaximum

        public void setMaximum​(LoggingLevel value)
        Sets the maximum level of records to accept.
        Parameters:
        value - the level
      • getMaximum

        public LoggingLevel getMaximum()
        Returns the maximum level of records to accept.
        Returns:
        the level
      • maximumTipText

        public String maximumTipText()
        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 class AbstractLogRecordFilter
        Parameters:
        record - the record to check
        Returns:
        true if the record's level falls in the specified min/max