You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/09/23 03:05:29 UTC

[1/5] logging-log4j2 git commit: LOG4J2-1447 LOG4J2-1349 javadoc

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 0a79e2689 -> 23731ded0


LOG4J2-1447 LOG4J2-1349 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/b6b6b355
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b6b6b355
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b6b6b355

Branch: refs/heads/master
Commit: b6b6b355d69840a95024ab4d8ae78387891d71cf
Parents: 57825cc
Author: rpopma <rp...@apache.org>
Authored: Fri Sep 23 11:43:30 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Sep 23 11:43:30 2016 +0900

----------------------------------------------------------------------
 .../org/apache/logging/log4j/core/ContextDataInjector.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b6b6b355/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java
index 584910c..65b9a76 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ContextDataInjector.java
@@ -35,9 +35,9 @@ import org.apache.logging.log4j.util.StringMap;
  * Users can configure the {@code ContextDataInjectorFactory} to provide custom {@code ContextDataInjector} objects,
  * in order to initialize log events with context data from any arbitrary context.
  * </p><p>
- * When providing a custom {@code ContextDataInjector}, be aware that the {@code ContextDataFactory} may be invoked
- * multiple times and the various components in Log4j that need access to context data may each have their own instance
- * of {@code ContextDataInjector}.
+ * When providing a custom {@code ContextDataInjector}, be aware that the {@code ContextDataInjectorFactory} may be
+ * invoked multiple times and the various components in Log4j that need access to context data may each have their own
+ * instance of {@code ContextDataInjector}.
  * This includes the object(s) that populate log events, but also various lookups and filters that look at
  * context data to determine whether an event should be logged.
  * </p><p>
@@ -45,6 +45,7 @@ import org.apache.logging.log4j.util.StringMap;
  * guarantees to enable optimal performance.
  * </p>
  *
+ * @see StringMap
  * @see ReadOnlyStringMap
  * @see ContextDataInjectorFactory
  * @see org.apache.logging.log4j.ThreadContext


[4/5] logging-log4j2 git commit: LOG4J2-1447 javadoc

Posted by rp...@apache.org.
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 <rp...@apache.org>
Authored: Fri Sep 23 12:03:37 2016 +0900
Committer: rpopma <rp...@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();


[5/5] logging-log4j2 git commit: Merge remote-tracking branch 'origin/master'

Posted by rp...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/master
Commit: 23731ded060be8adde27f83f604f98ad7712abe3
Parents: d4bdb74 0a79e26
Author: rpopma <rp...@apache.org>
Authored: Fri Sep 23 12:05:21 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Sep 23 12:05:21 2016 +0900

----------------------------------------------------------------------
 .../log4j/web/appender/ServletAppender.java     | 104 ++++++++++++++-----
 .../resources/WEB-INF/classes/log4j-servlet.xml |   2 +-
 src/changes/changes.xml                         |   5 +-
 3 files changed, 82 insertions(+), 29 deletions(-)
----------------------------------------------------------------------



[3/5] logging-log4j2 git commit: LOG4J2-1447 update documentation with link to LogEvent::getContextData()

Posted by rp...@apache.org.
LOG4J2-1447 update documentation with link to LogEvent::getContextData()


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

Branch: refs/heads/master
Commit: 3d8f3e5edd763c89a41b5b624462738a869dd801
Parents: 9e5c8d4
Author: rpopma <rp...@apache.org>
Authored: Fri Sep 23 11:50:22 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Sep 23 11:50:22 2016 +0900

----------------------------------------------------------------------
 src/site/xdoc/manual/extending.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3d8f3e5e/src/site/xdoc/manual/extending.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml
index c33f2d3..3b0070c 100644
--- a/src/site/xdoc/manual/extending.xml
+++ b/src/site/xdoc/manual/extending.xml
@@ -519,8 +519,9 @@ ListAppender list2 = ListAppender.newBuilder().setName("List1").setEntryPerNewLi
         <subsection name="Custom ContextDataInjector">
           <p>
             The <code>ContextDataInjector</code> (introduced in Log4j 2.7) is responsible for
-            populating the LogEvent's <code>ContextData</code> with key-value pairs
-            or replacing it completely.
+            populating the LogEvent's
+            <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/LogEvent.html#getContextData()">context data</a>
+            with key-value pairs or replacing it completely.
             The default implementation is ThreadContextDataInjector, which obtains context attributes from the ThreadContext.
           </p><p>
           Applications may replace the default ContextDataInjector by setting the value of the system property


[2/5] logging-log4j2 git commit: LOG4J2-1010 update docs: ContextDataInjector was moved from core.impl to core

Posted by rp...@apache.org.
LOG4J2-1010 update docs: ContextDataInjector was moved from core.impl to core


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

Branch: refs/heads/master
Commit: 9e5c8d4da25c6b0e9480723546a9e55a542850b5
Parents: b6b6b35
Author: rpopma <rp...@apache.org>
Authored: Fri Sep 23 11:45:54 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Sep 23 11:45:54 2016 +0900

----------------------------------------------------------------------
 src/site/xdoc/manual/extending.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9e5c8d4d/src/site/xdoc/manual/extending.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml
index fae89a5..c33f2d3 100644
--- a/src/site/xdoc/manual/extending.xml
+++ b/src/site/xdoc/manual/extending.xml
@@ -528,7 +528,7 @@ ListAppender list2 = ListAppender.newBuilder().setName("List1").setEntryPerNewLi
         </p><p>
           Implementors should be aware there are some subtleties related to thread-safety and implementing a
           context data injector in a garbage-free manner.
-          See the <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/impl/ContextDataInjector.html">ContextDataInjector</a>
+          See the <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/ContextDataInjector.html">ContextDataInjector</a>
           javadoc for detail.
         </p>
         </subsection>