@Plugin(name="PropertiesRewritePolicy", category="Core", elementType="rewritePolicy", printObject=true) public final class PropertiesRewritePolicy extends Object implements RewritePolicy
Modifier and Type | Field and Description |
---|---|
protected static org.apache.logging.log4j.Logger |
LOGGER
Allow subclasses access to the status logger without creating another instance.
|
Modifier and Type | Method and Description |
---|---|
static PropertiesRewritePolicy |
createPolicy(Configuration config,
Property[] props)
The factory method to create the PropertiesRewritePolicy.
|
LogEvent |
rewrite(LogEvent source)
Rewrite the event.
|
String |
toString() |
protected static final org.apache.logging.log4j.Logger LOGGER
public LogEvent rewrite(LogEvent source)
rewrite
in interface RewritePolicy
source
- a logging event that may be returned or
used to create a new logging event.@PluginFactory public static PropertiesRewritePolicy createPolicy(@PluginConfiguration Configuration config, @PluginElement(value="Properties") Property[] props)
config
- The Configuration.props
- key/value pairs for the new keys and values.Copyright © 1999-2021 Apache Software Foundation. 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.