////
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
////
[id=log4j.logEvent.contextData.type]
== `log4j.logEvent.contextData.type`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_LOG_EVENT_CONTEXT_DATA_TYPE`

| Type
| {log4j2-url}/javadoc/log4j-api/org/apache/logging/log4j/util/StringMap.html[`Class<? extends StringMap>`]

| Default value
| {log4j2-url}/javadoc/log4j-api/org/apache/logging/log4j/util/SortedArrayStringMap.html[`SortedArrayStringMap`]
|===

Fully qualified class name of a
{log4j2-url}/javadoc/log4j-api/org/apache/logging/log4j/util/StringMap.html[`StringMap`]
implementation to use to store context data in log events.
The implementation must have:

* a no-arg constructor,
* a constructor accepting a single `int` parameter that specifies the capacity of the string map.

[id=log4j.logEvent.contextData.injector]
== `log4j.logEvent.contextData.injector`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_LOG_EVENT_CONTEXT_DATA_INJECTOR`

| Type
| link:../javadoc/log4j-core/org/apache/logging/log4j/core/ContextDataInjector.html[`Class<? extends ContextDataInjector>`]

| Default value
| depends on the `ThreadContextMap` implementation
|===

Fully qualified class name of a
link:../javadoc/log4j-core/org/apache/logging/log4j/core/ContextDataInjector.html[`ContextDataInjector`]
implementation.

The default implementation uses all implementations of
link:../javadoc/log4j-core/org/apache/logging/log4j/core/util/ContextDataProvider.html[`ContextDataProvider`]
registered with `ServiceLoader`.

[id=log4j.logEvent.factory]
== `log4j.logEvent.factory`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_LOG_EVENT_FACTORY`

| Type
| link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/LogEventFactory.html[`Class<? extends LogEventFactory>`]

| Default value
| link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/ReusableLogEventFactory.html[`ReusableLogEventFactory`]
|===

Specifies the
link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/LogEventFactory.html[`LogEventFactory`]
implementation to use to create log events.