You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by sh...@apache.org on 2024/04/11 10:13:59 UTC
(bookkeeper) branch master updated: feat: allow user config AsyncLogger in log4j2 (#4269)
This is an automated email from the ASF dual-hosted git repository.
shoothzj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 8a4f935c17 feat: allow user config AsyncLogger in log4j2 (#4269)
8a4f935c17 is described below
commit 8a4f935c17f23d4d92bb7cb6e2116f353655a036
Author: ZhangJian He <sh...@gmail.com>
AuthorDate: Thu Apr 11 18:13:54 2024 +0800
feat: allow user config AsyncLogger in log4j2 (#4269)
### Motivation
Adding lmax disruptor in dependency allow user to config AsyncLogger in log4j2.xml like this
```xml
<Loggers>
<AsyncLogger name="async" level="info">
<AppenderRef ref="AsyncConsole"/>
</AsyncLogger>
</Loggers>
```
See also https://logging.apache.org/log4j/2.x/manual/async.html
Signed-off-by: ZhangJian He <sh...@gmail.com>
---
bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt | 2 ++
bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt | 2 ++
bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt | 2 ++
bookkeeper-server/pom.xml | 4 ++++
pom.xml | 6 ++++++
5 files changed, 16 insertions(+)
diff --git a/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt
index b441713fed..e965681e35 100644
--- a/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt
+++ b/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt
@@ -349,6 +349,7 @@ Apache Software License, Version 2.
- lib/org.jetbrains.kotlin-kotlin-stdlib-common-1.6.20.jar [56]
- lib/org.jetbrains.kotlin-kotlin-stdlib-jdk7-1.6.20.jar [56]
- lib/org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.6.20.jar [56]
+- lib/com.lmax-disruptor-4.0.0.jar [57]
[1] Source available at https://github.com/FasterXML/jackson-annotations/tree/jackson-annotations-2.13.4
[2] Source available at https://github.com/FasterXML/jackson-core/tree/jackson-core-2.13.4
@@ -401,6 +402,7 @@ Apache Software License, Version 2.
[54] Source available at https://github.com/square/okio/releases/tag/parent-3.2.0
[55] Source available at https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.26.0
[56] Source available at https://github.com/JetBrains/kotlin/releases/tag/v1.6.20
+[57] Source available at https://github.com/LMAX-Exchange/disruptor/releases/tag/4.0.0
------------------------------------------------------------------------------------
lib/io.netty-netty-codec-4.1.108.Final.jar bundles some 3rd party dependencies
diff --git a/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt
index d26c6611d3..9543b43bec 100644
--- a/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt
+++ b/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt
@@ -292,6 +292,7 @@ Apache Software License, Version 2.
- lib/org.xerial.snappy-snappy-java-1.1.10.5.jar [50]
- lib/io.reactivex.rxjava3-rxjava-3.0.1.jar [51]
- lib/com.carrotsearch-hppc-0.9.1.jar [52]
+- lib/com.lmax-disruptor-4.0.0.jar [53]
[1] Source available at https://github.com/FasterXML/jackson-annotations/tree/jackson-annotations-2.13.4
[2] Source available at https://github.com/FasterXML/jackson-core/tree/jackson-core-2.13.4
@@ -332,6 +333,7 @@ Apache Software License, Version 2.
[50] Source available at https://github.com/xerial/snappy-java/releases/tag/v1.1.10.5
[51] Source available at https://github.com/ReactiveX/RxJava/tree/v3.0.1
[52] Source available at https://github.com/carrotsearch/hppc/tree/0.9.1
+[53] Source available at https://github.com/LMAX-Exchange/disruptor/releases/tag/4.0.0
------------------------------------------------------------------------------------
lib/io.netty-netty-codec-4.1.108.Final.jar bundles some 3rd party dependencies
diff --git a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt
index 96b0b43b62..939e07fdf4 100644
--- a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt
+++ b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt
@@ -345,6 +345,7 @@ Apache Software License, Version 2.
- lib/org.jetbrains.kotlin-kotlin-stdlib-common-1.6.20.jar [55]
- lib/org.jetbrains.kotlin-kotlin-stdlib-jdk7-1.6.20.jar [55]
- lib/org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.6.20.jar [55]
+- lib/com.lmax-disruptor-4.0.0.jar [56]
[1] Source available at https://github.com/FasterXML/jackson-annotations/tree/jackson-annotations-2.13.4
[2] Source available at https://github.com/FasterXML/jackson-core/tree/jackson-core-2.13.4
@@ -396,6 +397,7 @@ Apache Software License, Version 2.
[53] Source available at https://github.com/square/okio/releases/tag/parent-3.2.0
[54] Source available at https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.26.0
[55] Source available at https://github.com/JetBrains/kotlin/releases/tag/v1.6.20
+[56] Source available at https://github.com/LMAX-Exchange/disruptor/releases/tag/4.0.0
------------------------------------------------------------------------------------
lib/io.netty-netty-codec-4.1.108.Final.jar bundles some 3rd party dependencies
diff --git a/bookkeeper-server/pom.xml b/bookkeeper-server/pom.xml
index ac099ebfa5..03982d1ad3 100644
--- a/bookkeeper-server/pom.xml
+++ b/bookkeeper-server/pom.xml
@@ -166,6 +166,10 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ </dependency>
<!-- testing dependencies -->
<dependency>
<groupId>org.apache.bookkeeper</groupId>
diff --git a/pom.xml b/pom.xml
index 64a629a9fb..9d755fe858 100644
--- a/pom.xml
+++ b/pom.xml
@@ -128,6 +128,7 @@
<commons-io.version>2.7</commons-io.version>
<bouncycastle.version>1.0.2.4</bouncycastle.version>
<curator.version>5.1.0</curator.version>
+ <disruptor.version>4.0.0</disruptor.version>
<dropwizard.version>4.1.12.1</dropwizard.version>
<etcd.version>0.5.11</etcd.version>
<freebuilder.version>2.8.0</freebuilder.version>
@@ -255,6 +256,11 @@
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ <version>${disruptor.version}</version>
+ </dependency>
<!-- commons dependencies -->
<dependency>