-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration to log4j2 #4139
Migration to log4j2 #4139
Conversation
c8903ba
to
35d916e
Compare
Codecov Report
@@ Coverage Diff @@
## master #4139 +/- ##
============================================
- Coverage 67.09% 66.95% -0.14%
Complexity 20 20
============================================
Files 1037 1039 +2
Lines 51447 51818 +371
Branches 7200 7264 +64
============================================
+ Hits 34517 34696 +179
- Misses 14567 14720 +153
- Partials 2363 2402 +39
Continue to review full report at Codecov.
|
e8892bf
to
f96f2f1
Compare
Thanks for picking this up. Did you manually convert the existing log4j properties files to the corresponding xml versions (or was there an automated way to do it)? It will be good to also verify that this version indeed fixes the perf issues. |
@sunithabeeram I manually converted the configs and they are slightly different I will do testing before merging this. |
For internal high qps use case, we see the following performance bump 1 broker, 1 server with log4j with log4j2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
// org.apache.log4j.jmx.* is not compatible under log4j-1.2-api, which provides the backward compatibility for | ||
// log4j 1.* api for log4j2. In order to avoid 'class not found error', the following line disables log4j jmx | ||
// bean registration for local zookeeper instance | ||
System.setProperty("zookeeper.jmx.log4j.disable", "true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do later versions of ZK work better with log4j2? Wondering what our plan should be to stop relying on log4j-1.2-api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should still keep log4j-1.2-api
since some of our dependencies are directly using log4j 1.x api (e.g. zookeeper). Zookeeper is still on log4j 1.x so using later version won't help here. There was some effort to do migration but the pr didn't get merged and closed. apache/zookeeper#148
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a licensing header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ignore license check for test/resources
but i will add the header for completeness.
As stated in apache#3913, log4j has been identified as a performance bottleneck for high qps use cases because it is using a global lock for "Category.callAppenders()" method. log4j2 supports async logging so this migration should improve the performance for high qps use cases.
As stated in #3913, log4j has been identified as a
performance bottleneck for high qps use cases because
it is using a global lock for "Category.callAppenders()"
method.
log4j2 supports async logging so this migration should
improve the performance for high qps use cases.