public class ContextDataFactory extends Object
By default returns SortedArrayStringMap
objects. Can be configured by setting system property
"log4j2.ContextData"
to the fully qualified class name of a class implementing the
StringMap
interface. The class must have a public default constructor, and if possible should also have a
public constructor that takes a single int
argument for the initial capacity.
LogEvent.getContextData()
,
ContextDataInjector
,
SortedArrayStringMap
Constructor | Description |
---|---|
ContextDataFactory() |
Modifier and Type | Method | Description |
---|---|---|
static StringMap |
createContextData() |
|
static StringMap |
createContextData(int initialCapacity) |
|
static StringMap |
emptyFrozenContextData() |
An empty pre-frozen StringMap.
|
public static StringMap createContextData()
public static StringMap createContextData(int initialCapacity)
public static StringMap emptyFrozenContextData()
Copyright © 1999-2018. 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.