LOG4J2-1447 javadoc

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d4bdb746
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d4bdb746
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d4bdb746

Branch: refs/heads/master
Commit: d4bdb746aeb176a7f7de774e0dc0c7c3f3ff486c
Parents: 3d8f3e5
Author: rpopma <rpo...@apache.org>
Authored: Fri Sep 23 12:03:37 2016 +0900
Committer: rpopma <rpo...@apache.org>
Committed: Fri Sep 23 12:03:37 2016 +0900

----------------------------------------------------------------------
 .../logging/log4j/core/impl/ContextDataFactory.java    | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d4bdb746/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataFactory.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataFactory.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataFactory.java
index 50b5df5..49d2b97 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataFactory.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ContextDataFactory.java
@@ -16,18 +16,25 @@
  */
 package org.apache.logging.log4j.core.impl;
 
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.ContextDataInjector;
 import org.apache.logging.log4j.util.SortedArrayStringMap;
 import org.apache.logging.log4j.util.StringMap;
 import org.apache.logging.log4j.util.PropertiesUtil;
 
 /**
- * Factory for creating StringMap instances.
+ * Factory for creating the StringMap instances used to initialize LogEvents'
+ * {@linkplain LogEvent#getContextData() context data}. When context data is
+ * {@linkplain ContextDataInjector injected} into the log event, these 
StringMap
+ * instances may be either populated with key-value pairs from the context, or 
completely replaced altogether.
  * <p>
  * By default returns {@code SortedArrayStringMap} objects. Can be configured 
by setting system property
- * {@code "log4j2.ReadOnlyStringMap"} to the fully qualified class name of a 
class implementing the
+ * {@code "log4j2.ContextData"} to the fully qualified class name of a class 
implementing the
  * {@code StringMap} interface. The class must have a public default 
constructor.
  * </p>
  *
+ * @see LogEvent#getContextData()
+ * @see ContextDataInjector
  * @see SortedArrayStringMap
  * @since 2.7
  */
@@ -35,7 +42,7 @@ public class ContextDataFactory {
 
     @SuppressWarnings("unchecked")
     public static StringMap createContextData() {
-        final String CLASS = 
PropertiesUtil.getProperties().getStringProperty("log4j2.ReadOnlyStringMap",
+        final String CLASS = 
PropertiesUtil.getProperties().getStringProperty("log4j2.ContextData",
                 SortedArrayStringMap.class.getName());
         try {
             return (StringMap) Class.forName(CLASS).newInstance();

Reply via email to