@Plugin(name="replace", category="Core", printObject=true) public final class RegexReplacement extends Object
Modifier and Type | Method | Description |
---|---|---|
static RegexReplacement |
createRegexReplacement(Pattern regex,
String replacement) |
Create a RegexReplacement.
|
String |
format(String msg) |
Perform the replacement.
|
String |
toString() |
public String format(String msg)
msg
- The String to match against.@PluginFactory public static RegexReplacement createRegexReplacement(@PluginAttribute("regex") Pattern regex, @PluginAttribute("replacement") String replacement)
regex
- The regular expression to locate.replacement
- The replacement value.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.