java.util.logging.Filterpublic final class SubstituteFilter
extends java.lang.Object
implements java.util.logging.Filter
| Constructor | Description |
|---|---|
SubstituteFilter(java.lang.String patternString,
java.lang.String replacement,
boolean replaceAll) |
Construct a new instance.
|
SubstituteFilter(java.util.regex.Pattern pattern,
java.lang.String replacement,
boolean replaceAll) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
isLoggable(java.util.logging.LogRecord record) |
Apply the filter to the given log record.
|
public SubstituteFilter(java.util.regex.Pattern pattern,
java.lang.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(java.lang.String patternString,
java.lang.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(java.util.logging.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 java.util.logging.Filterrecord - the log record to inspect and modifytrue alwaysCopyright © 2018. All rights reserved.