public class PropertyRewritePolicy extends java.lang.Object implements RewritePolicy
The combination of the RewriteAppender and this policy performs the same actions as the PropertyFilter from log4j 1.3.
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
properties |
Constructor and Description |
---|
PropertyRewritePolicy() |
Modifier and Type | Method and Description |
---|---|
private java.lang.Thread |
getThread(java.lang.String name) |
LoggingEvent |
rewrite(LoggingEvent source)
Rewrite a logging event.
|
void |
setProperties(java.lang.String props)
Set a string representing the property name/value pairs.
|
public void setProperties(java.lang.String props)
Form: propname1=propvalue1,propname2=propvalue2
props
- public LoggingEvent rewrite(LoggingEvent source)
rewrite
in interface RewritePolicy
source
- a logging event that may be returned or
used to create a new logging event.private java.lang.Thread getThread(java.lang.String name)