Top Description Fields Constructors Methods
org.jboss.logmanager.filters

public final Class RegexFilter

extends Object
implements Filter
Class Inheritance
All Implemented Interfaces
java.util.logging.Filter
Imports
java.text.MessageFormat, java.util.logging.Filter, .LogRecord, java.util.regex.Pattern, org.jboss.logmanager.ExtLogRecord

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.

Field Summary

Modifier and TypeField and Description
private final Pattern

Constructor Summary

AccessConstructor and Description
public
RegexFilter(final Pattern
the pattern to match
pattern
)

Create a new instance.

public
RegexFilter(final String
the pattern string to match
patternString
)

Create a new instance.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the log record is loggable
isLoggable
(final LogRecord
the log record
record
)

Implements java.util.logging.Filter.isLoggable.

Determine if this log record is loggable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

patternback to summary
private final Pattern pattern

Constructor Detail

RegexFilterback to summary
public RegexFilter(final Pattern pattern)

Create a new instance.

Parameters
pattern:Pattern

the pattern to match

RegexFilterback to summary
public RegexFilter(final String patternString)

Create a new instance.

Parameters
patternString:String

the pattern string to match

Method Detail

isLoggableback to summary
public boolean isLoggable(final LogRecord record)

Implements java.util.logging.Filter.isLoggable.

Determine if this log record is loggable.

Parameters
record:LogRecord

the log record

Returns:boolean

true if the log record is loggable

Annotations
@Override