- java.lang.Object
-
- org.jboss.logmanager.filters.SubstituteFilter
-
-
Constructor Summary
Constructors Constructor Description SubstituteFilter(String patternString, String replacement, boolean replaceAll)Construct a new instance.SubstituteFilter(Pattern pattern, String replacement, boolean replaceAll)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisLoggable(LogRecord record)Apply the filter to the given log record.
-
-
-
Constructor Detail
-
SubstituteFilter
public SubstituteFilter(Pattern pattern, String replacement, boolean replaceAll)
Construct a new instance.- Parameters:
pattern- the pattern to matchreplacement- the string replacementreplaceAll-trueif all occurrences should be replaced;falseif only the first occurrence
-
SubstituteFilter
public SubstituteFilter(String patternString, String replacement, boolean replaceAll)
Construct a new instance.- Parameters:
patternString- the pattern to matchreplacement- the string replacementreplaceAll-trueif all occurrences should be replaced;falseif only the first occurrence
-
-
Method Detail
-
isLoggable
public boolean isLoggable(LogRecord record)
Apply the filter to the given log record. Theformat stylewill always be set toExtLogRecord.FormatStyle.NO_FORMATas the formatted message will be the one used in the replacement.- Specified by:
isLoggablein interfaceFilter- Parameters:
record- the log record to inspect and modify- Returns:
truealways
-
-