Class PropertiesRewritePolicy
java.lang.Object
org.apache.logging.log4j.core.appender.rewrite.PropertiesRewritePolicy
- All Implemented Interfaces:
- RewritePolicy
@Plugin(name="PropertiesRewritePolicy",
        category="Core",
        elementType="rewritePolicy",
        printObject=true)
public final class PropertiesRewritePolicy
extends Object
implements RewritePolicy
This policy modifies events by replacing or possibly adding keys and values to the MapMessage.
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic PropertiesRewritePolicycreatePolicy(Configuration config, Property[] props) Creates a PropertiesRewritePolicy.Rewrites the event.toString()
- 
Field Details- 
LOGGERAllows subclasses access to the status logger without creating another instance.
 
- 
- 
Method Details- 
rewriteRewrites the event.- Specified by:
- rewritein interface- RewritePolicy
- Parameters:
- source- a logging event that may be returned or used to create a new logging event.
- Returns:
- The LogEvent after rewriting.
 
- 
toString
- 
createPolicy@PluginFactory public static PropertiesRewritePolicy createPolicy(@PluginConfiguration Configuration config, @PluginElement("Properties") Property[] props) Creates a PropertiesRewritePolicy.- Parameters:
- config- The Configuration.
- props- key/value pairs for the new keys and values.
- Returns:
- The PropertiesRewritePolicy.
 
 
-