@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 Logger |
LOGGER
Allows subclasses access to the status logger without creating another instance.
|
Modifier and Type | Method and Description |
---|---|
static PropertiesRewritePolicy |
createPolicy(Configuration config,
Property[] props)
Creates a PropertiesRewritePolicy.
|
LogEvent |
rewrite(LogEvent source)
Rewrites 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(value="Properties") Property[] props)
config
- The Configuration.props
- key/value pairs for the new keys and values. Copyright © 1999-2023 The 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.