@Plugin(name="PropertiesRewritePolicy", category="Core", elementType="rewritePolicy", printObject=true) public final class PropertiesRewritePolicy extends java.lang.Object implements RewritePolicy
Modifier and Type | Field and Description |
---|---|
private Configuration |
config |
protected static Logger |
LOGGER
Allows subclasses access to the status logger without creating another instance.
|
private java.util.Map<Property,java.lang.Boolean> |
properties |
Modifier | Constructor and Description |
---|---|
private |
PropertiesRewritePolicy(Configuration config,
java.util.List<Property> props) |
Modifier and Type | Method and Description |
---|---|
static PropertiesRewritePolicy |
createPolicy(Configuration config,
Property[] props)
Creates a PropertiesRewritePolicy.
|
LogEvent |
rewrite(LogEvent source)
Rewrites the event.
|
java.lang.String |
toString() |
protected static final Logger LOGGER
private final java.util.Map<Property,java.lang.Boolean> properties
private final Configuration config
private PropertiesRewritePolicy(Configuration config, java.util.List<Property> props)
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.public java.lang.String toString()
toString
in class java.lang.Object
@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.