org.apache.logging.log4j.core.layout
Class LoggerFields

java.lang.Object
  extended by org.apache.logging.log4j.core.layout.LoggerFields

@Plugin(name="LoggerFields",
        category="Core",
        printObject=true)
public final class LoggerFields
extends Object

A LoggerFields container.


Method Summary
static LoggerFields createLoggerFields(KeyValuePair[] keyValuePairs, String sdId, String enterpriseId, boolean discardIfAllFieldsAreEmpty)
          Create a LoggerFields from KeyValuePairs.
 boolean getDiscardIfAllFieldsAreEmpty()
           
 Map<String,String> getMap()
           
 org.apache.logging.log4j.message.StructuredDataId getSdId()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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-ELEMENT
enterpriseId - The IANA assigned enterprise number
discardIfAllFieldsAreEmpty - 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.