You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/03/28 23:10:25 UTC

[logging-log4j2] 06/06: BasicAsyncLoggerContextSelector documentation

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master-java11
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 2e0e3bcdc82495aa9bddb488dcca22e37cd8acf2
Author: Carter Kozak <ck...@apache.org>
AuthorDate: Tue Mar 23 21:33:15 2021 -0400

    BasicAsyncLoggerContextSelector documentation
---
 src/site/asciidoc/manual/async.adoc         | 10 +++++++---
 src/site/asciidoc/manual/configuration.adoc |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/site/asciidoc/manual/async.adoc b/src/site/asciidoc/manual/async.adoc
index c89921b..308f676 100644
--- a/src/site/asciidoc/manual/async.adoc
+++ b/src/site/asciidoc/manual/async.adoc
@@ -119,7 +119,8 @@ required._
 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 `log4j2.contextSelector` to
-`org.apache.logging.log4j.core.async.AsyncLoggerContextSelector`.
+`org.apache.logging.log4j.core.async.AsyncLoggerContextSelector` or
+`org.apache.logging.log4j.core.async.BasicAsyncLoggerContextSelector`.
 
 By default, link:#Location[location] is not passed to the I/O thread by
 asynchronous loggers. If one of your layouts or custom filters needs
@@ -134,6 +135,8 @@ A configuration that does not require location might look like:
 
 <!-- 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">
@@ -153,9 +156,10 @@ A configuration that does not require location might look like:
 </Configuration>
 ----
 
-When `AsyncLoggerContextSelector` is used to make all loggers
+When `AsyncLoggerContextSelector` or
+`BasicAsyncLoggerContextSelector` is used to make all loggers
 asynchronous, make sure to use normal `<root>` and `<logger>` elements
-in the configuration. The AsyncLoggerContextSelector will ensure that
+in the configuration. The context selector will ensure that
 all loggers are asynchronous, using a mechanism that is different from
 what happens when you configure `<asyncRoot>` or `<asyncLogger>`. The
 latter elements are intended for mixing async with sync loggers. If you
diff --git a/src/site/asciidoc/manual/configuration.adoc b/src/site/asciidoc/manual/configuration.adoc
index 125a5b2..cb17098 100644
--- a/src/site/asciidoc/manual/configuration.adoc
+++ b/src/site/asciidoc/manual/configuration.adoc
@@ -1725,6 +1725,9 @@ circumstances. See link:logsep.html[Log Separation] for more details.
 Available context selector implementation classes: +
 `org.apache.logging.log4j.core.async .AsyncLoggerContextSelector` -
 makes link:async.html[all loggers asynchronous]. +
+`org.apache.logging.log4j.core.async .BasicAsyncLoggerContextSelector` -
+makes link:async.html[all loggers asynchronous] using a single shared
+AsyncLoggerContext. +
 `org.apache.logging.log4j.core.selector .BasicContextSelector` - creates
 a single shared LoggerContext. +
 `org.apache.logging.log4j.core.selector .ClassLoaderContextSelector` -