|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.logging.log4j.core.appender.rewrite.MapRewritePolicy
@Plugin(name="MapRewritePolicy",
category="Core",
elementType="rewritePolicy",
printObject=true)
public final class MapRewritePolicyThis policy modifies events by replacing or possibly adding keys and values to the MapMessage.
| Nested Class Summary | |
|---|---|
static class |
MapRewritePolicy.Mode
An enumeration to identify whether keys not in the MapMessage should be added or whether only existing keys should be updated. |
| Field Summary | |
|---|---|
protected static Logger |
LOGGER
Allow subclasses access to the status logger without creating another instance. |
| Method Summary | |
|---|---|
static MapRewritePolicy |
createPolicy(String mode,
KeyValuePair[] pairs)
The factory method to create the MapRewritePolicy. |
LogEvent |
rewrite(LogEvent source)
Rewrite the event. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger LOGGER
| Method Detail |
|---|
public LogEvent rewrite(LogEvent source)
rewrite in interface RewritePolicysource - a logging event that may be returned or
used to create a new logging event.
public String toString()
toString in class Object
@PluginFactory
public static MapRewritePolicy createPolicy(@PluginAttribute(value="mode")
String mode,
@PluginElement(value="KeyValuePair")
KeyValuePair[] pairs)
mode - The string representation of the Mode.pairs - key/value pairs for the new Map keys and values.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 1999-2014 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.