You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ck...@apache.org on 2021/03/24 19:22:45 UTC
[logging-log4j2] 02/02: BasicAsyncLoggerContextSelector
documentation
This is an automated email from the ASF dual-hosted git repository.
ckozak pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 5b34274e5555e9a76ff06b3ff0881df48189cc41
Author: Carter Kozak <ck...@apache.org>
AuthorDate: Tue Mar 23 21:33:15 2021 -0400
BasicAsyncLoggerContextSelector documentation
---
src/site/xdoc/manual/async.xml | 10 +++++++---
src/site/xdoc/manual/configuration.xml.vm | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/site/xdoc/manual/async.xml b/src/site/xdoc/manual/async.xml
index 699ec97..e704f78 100644
--- a/src/site/xdoc/manual/async.xml
+++ b/src/site/xdoc/manual/async.xml
@@ -133,7 +133,8 @@
<p>
This is simplest to configure and gives the best performance. To make all loggers asynchronous,
add the disruptor jar to the classpath and set the system property <tt>log4j2.contextSelector</tt>
- to <tt>org.apache.logging.log4j.core.async.AsyncLoggerContextSelector</tt>.
+ to <tt>org.apache.logging.log4j.core.async.AsyncLoggerContextSelector</tt> or
+ <tt>org.apache.logging.log4j.core.async.BasicAsyncLoggerContextSelector</tt>.
</p>
<p>
By default, <a href="#Location">location</a> is not passed to the I/O thread by
@@ -147,6 +148,8 @@
<!-- Don't forget to set system property
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
+or
+-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.BasicAsyncLoggerContextSelector
to make all loggers asynchronous. -->
<Configuration status="WARN">
@@ -165,9 +168,10 @@
</Loggers>
</Configuration>]]></pre>
<p>
- When <tt>AsyncLoggerContextSelector</tt> is used to make all loggers asynchronous, make sure to use normal
+ When <tt>AsyncLoggerContextSelector</tt> or <tt>BasicAsyncLoggerContextSelector</tt> is used to make all
+ loggers asynchronous, make sure to use normal
<tt><root></tt> and <tt><logger></tt> elements in the configuration. The
- AsyncLoggerContextSelector will ensure that all loggers are asynchronous, using a mechanism
+ context selector will ensure that all loggers are asynchronous, using a mechanism
that is different from what happens when you configure <tt><asyncRoot></tt>
or <tt><asyncLogger></tt>.
The latter elements are intended for mixing async with sync loggers. If you use both mechanisms
diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm
index 72272c4..dbcae15 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -1740,6 +1740,7 @@ public class AwesomeTest {
Available context selector implementation classes:<br />
<!-- deliberately inserted spaces to allow line break -->
<tt>org.apache.logging.log4j.core.async .AsyncLoggerContextSelector</tt> - makes <a href="async.html">all loggers asynchronous</a>.<br />
+ <tt>org.apache.logging.log4j.core.async .BasicAsyncLoggerContextSelector</tt> - makes <a href="async.html"> all loggers asynchronous using a single shared AsyncLoggerContext.<br />
<tt>org.apache.logging.log4j.core.selector .BasicContextSelector</tt> - creates a single shared LoggerContext.<br />
<tt>org.apache.logging.log4j.core.selector .ClassLoaderContextSelector</tt> - separate LoggerContexts for each web application.<br />
<tt>org.apache.logging.log4j.core.selector .JndiContextSelector</tt> - use JNDI to locate each web application's LoggerContext.<br/>