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/11/03 14:55:09 UTC

[10/10] logging-log4j2 git commit: LOG4J2-1660 updated site documentation

LOG4J2-1660 updated site documentation


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

Branch: refs/heads/master
Commit: 6eae62eb2844eb0b03964122f6c41ad6f02b3ed5
Parents: 2aa3e53
Author: rpopma <rp...@apache.org>
Authored: Thu Nov 3 23:54:48 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Thu Nov 3 23:54:48 2016 +0900

----------------------------------------------------------------------
 src/site/xdoc/manual/extending.xml      | 13 +++++++++++++
 src/site/xdoc/manual/thread-context.xml |  6 +++---
 2 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6eae62eb/src/site/xdoc/manual/extending.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml
index 3b0070c..357bb67 100644
--- a/src/site/xdoc/manual/extending.xml
+++ b/src/site/xdoc/manual/extending.xml
@@ -533,6 +533,19 @@ ListAppender list2 = ListAppender.newBuilder().setName("List1").setEntryPerNewLi
           javadoc for detail.
         </p>
         </subsection>
+        <subsection name="Custom ThreadContextMap implementations">
+          <p>
+            A garbage-free StringMap-based context map can be installed by setting system property log4j2.garbagefree.threadContextMap
+            to true. (Log4j must be <a href="garbagefree.html#Config">enabled</a> to use ThreadLocals.)
+          </p><p>
+            Any custom <tt>ThreadContextMap</tt> implementation can be installed by setting system property
+            log4j2.threadContextMap to the fully qualified class name of the class implementing the
+            ThreadContextMap interface. By also implementing the <tt>ReadOnlyThreadContextMap</tt> interface, your custom
+            ThreadContextMap implementation will be accessible to applications via the
+          <a href="../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html#getThreadContextMap()">ThreadContext::getThreadContextMap</a>
+            method.
+          </p>
+        </subsection>
           <subsection name="Custom Plugins">
             <p>See the <a href="plugins.html">Plugins</a> section of the manual.</p>
 <!-- TODO: some documentation here! -->

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6eae62eb/src/site/xdoc/manual/thread-context.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/thread-context.xml b/src/site/xdoc/manual/thread-context.xml
index 5ca874f..dd5b21c 100644
--- a/src/site/xdoc/manual/thread-context.xml
+++ b/src/site/xdoc/manual/thread-context.xml
@@ -167,10 +167,10 @@ try (final CloseableThreadContext.Instance ctc = CloseableThreadContext.put("id"
               Use <code>%x</code> to include the full contents of the <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Stack.html">Stack</a>.
             </li>
           </ul>
-          <h4>Non thread-local context data </h4>
+          <h4>Custom context data injectors for non thread-local context data</h4>
           <p>
-            The ThreadContext allows us to tag logging statements so we can link log entries that were related
-            in some way. The limitation is that this only works for logging done on the same application thread
+            With the ThreadContext logging statements can be tagged so log entries that were related in some way
+            can be linked via these tags. The limitation is that this only works for logging done on the same application thread
             (or child threads when configured).
           </p>
           <p>