Class RegexFilter

java.lang.Object
org.jboss.logmanager.filters.RegexFilter
All Implemented Interfaces:
Filter

public final class RegexFilter extends Object implements Filter
A regular-expression-based filter. Used to exclude log records which match or don't match the expression. The regular expression is checked against the raw (unformatted) message.
  • Constructor Details

    • RegexFilter

      public RegexFilter(Pattern pattern)
      Create a new instance.
      Parameters:
      pattern - the pattern to match
    • RegexFilter

      public RegexFilter(String patternString)
      Create a new instance.
      Parameters:
      patternString - the pattern string to match
  • Method Details

    • isLoggable

      public boolean isLoggable(LogRecord record)
      Determine if this log record is loggable.
      Specified by:
      isLoggable in interface Filter
      Parameters:
      record - the log record
      Returns:
      true if the log record is loggable