Constructor and Description |
---|
SubstituteFilter(Pattern pattern,
String replacement,
boolean replaceAll)
Construct a new instance.
|
SubstituteFilter(String patternString,
String replacement,
boolean replaceAll)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLoggable(LogRecord record)
Apply the filter to the given log record.
|
public SubstituteFilter(Pattern pattern, String replacement, boolean replaceAll)
pattern
- the pattern to matchreplacement
- the string replacementreplaceAll
- true
if all occurrances should be replaced; false
if only the first occurrancepublic SubstituteFilter(String patternString, String replacement, boolean replaceAll)
patternString
- the pattern to matchreplacement
- the string replacementreplaceAll
- true
if all occurrances should be replaced; false
if only the first occurrancepublic boolean isLoggable(LogRecord record)
format style
will always be set to ExtLogRecord.FormatStyle.NO_FORMAT
as the formatted
message will be the one used in the replacement.isLoggable
in interface Filter
record
- the log record to inspect and modifytrue
alwaysCopyright © 2016 JBoss by Red Hat. All rights reserved.