org.apache.logging.log4j.core.layout
Class LoggerFields
java.lang.Object
org.apache.logging.log4j.core.layout.LoggerFields
@Plugin(name="LoggerFields",
category="Core",
printObject=true)
public final class LoggerFields
- extends Object
A LoggerFields container.
getMap
public Map<String,String> getMap()
toString
public String toString()
- Overrides:
toString
in class Object
createLoggerFields
@PluginFactory
public static LoggerFields createLoggerFields(@PluginElement(value="LoggerFields")
KeyValuePair[] keyValuePairs,
@PluginAttribute(value="sdId")
String sdId,
@PluginAttribute(value="enterpriseId")
String enterpriseId,
@PluginAttribute(value="discardIfAllFieldsAreEmpty",defaultBoolean=false)
boolean discardIfAllFieldsAreEmpty)
- Create a LoggerFields from KeyValuePairs.
- Parameters:
keyValuePairs
- An array of KeyValuePairs.sdId
- The SD-ID in an SD-ELEMENTenterpriseId
- The IANA assigned enterprise numberdiscardIfAllFieldsAreEmpty
- this SD-ELEMENT should be discarded if all fields are empty
- Returns:
- A LoggerFields instance containing a Map<String, String>.
getSdId
public org.apache.logging.log4j.message.StructuredDataId getSdId()
getDiscardIfAllFieldsAreEmpty
public boolean getDiscardIfAllFieldsAreEmpty()
Copyright © 1999-2015 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.