RewritePolicy
@Plugin(name="PropertiesRewritePolicy", category="Core", elementType="rewritePolicy", printObject=true) public final class PropertiesRewritePolicy extends Object implements RewritePolicy
Modifier and Type | Field | Description |
---|---|---|
protected static Logger |
LOGGER |
Allow subclasses access to the status logger without creating another instance.
|
Modifier and Type | Method | 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 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("Properties") Property[] props)
config
- The Configuration.props
- key/value pairs for the new keys and values.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.