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/08/23 16:20:13 UTC
[07/10] logging-log4j2 git commit: LOG4J2-1010 updated manual for
ThreadContextMapFilter aliasing to ContextMapFilter and potentially handling
other contexts than ThreadContext
LOG4J2-1010 updated manual for ThreadContextMapFilter aliasing to ContextMapFilter and potentially handling other contexts than ThreadContext
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/9a09ccbd
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/9a09ccbd
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/9a09ccbd
Branch: refs/heads/LOG4J2-1349-gcfree-threadcontext
Commit: 9a09ccbd4e8432c0d486e4257c377a326baaf5aa
Parents: ca90bc1
Author: rpopma <rp...@apache.org>
Authored: Wed Aug 24 01:14:14 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Wed Aug 24 01:14:14 2016 +0900
----------------------------------------------------------------------
src/site/xdoc/manual/filters.xml | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9a09ccbd/src/site/xdoc/manual/filters.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/filters.xml b/src/site/xdoc/manual/filters.xml
index a53b3bf..bab5ae9 100644
--- a/src/site/xdoc/manual/filters.xml
+++ b/src/site/xdoc/manual/filters.xml
@@ -653,12 +653,13 @@
</Configuration>]]></pre>
</subsection>
<a name="ThreadContextMapFilter"/>
- <subsection name="ThreadContextMapFilter">
+ <subsection name="ThreadContextMapFilter (or ContextMapFilter)">
<p>
- The ThreadContextMapFilter allows filtering against data elements that are in the ThreadContext Map.
+ The ThreadContextMapFilter or ContextMapFilter allows filtering against data elements that are in the
+ current context. By default this is the ThreadContext Map.
</p>
<table>
- <caption align="top">ThreadContext Map Filter Parameters</caption>
+ <caption align="top">Context Map Filter Parameters</caption>
<tr>
<th>Parameter Name</th>
<th>Type</th>
@@ -690,14 +691,14 @@
</tr>
</table>
<p>
- A configuration containing the ThreadContextMapFilter might look like:
+ A configuration containing the ContextMapFilter might look like:
</p>
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="MyApp" packages="">
- <ThreadContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
+ <ContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
<KeyValuePair key="User1" value="DEBUG"/>
<KeyValuePair key="User2" value="WARN"/>
- </ThreadContextMapFilter>
+ </ContextMapFilter>
<Appenders>
<RollingFile name="RollingFile" fileName="logs/app.log"
filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
@@ -715,7 +716,7 @@
</Loggers>
</Configuration>]]></pre>
<p>
- The ThreadContextMapFilter can also be applied to a logger for filtering:
+ The ContextMapFilter can also be applied to a logger for filtering:
</p>
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="MyApp" packages="">
@@ -732,10 +733,10 @@
<Loggers>
<Root level="error">
<AppenderRef ref="RollingFile"/>
- <ThreadContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
+ <ContextMapFilter onMatch="ACCEPT" onMismatch="NEUTRAL" operator="or">
<KeyValuePair key="foo" value="bar"/>
<KeyValuePair key="User2" value="WARN"/>
- </ThreadContextMapFilter>
+ </ContextMapFilter>
</Root>
</Loggers>
</Configuration>