-
Notifications
You must be signed in to change notification settings - Fork 282
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
[Backport 1.3] Switch to log4j logger (#1751) #1791
[Backport 1.3] Switch to log4j logger (#1751) #1791
Conversation
In OpenSearch 1.3.0 we removed an explicit dependency on log4j opensearch-project#1563 this caused the log4j-slf4j-impl-X.XX.X.jar file no longer to be included in the plugin. When the plugin started up the default no-op logger was used instead. This prevented the security plugin from logging anything, yikes. When looking at the other opensearch plugins, none of them use slf4. Rather than continue using a seperate logging process, moving to the standard log4j Logger/LogManager. Tested this change on 2.0.0-alpha distribution and logging works as expected. Signed-off-by: Peter Nied <[email protected]> (cherry picked from commit 54a920b)
Codecov Report
@@ Coverage Diff @@
## 1.3 #1791 +/- ##
=========================================
Coverage 64.64% 64.64%
+ Complexity 3222 3220 -2
=========================================
Files 247 247
Lines 17363 17363
Branches 3086 3086
=========================================
Hits 11225 11225
Misses 4590 4590
Partials 1548 1548
Continue to review full report at Codecov.
|
Signed-off-by: Peter Nied <[email protected]>
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.
Please merge DarshitChanpura#2 to resolve some files that were missed
Fix 2 files that missed the update
@DarshitChanpura Looks like there is a build issue with the changes |
Signed-off-by: Darshit Chanpura <[email protected]>
Came here and spent two days figuring out why 1.3.x isn't logging the security plugin.
I'm not a java expert, assuming you can uncomment the rootLogger This how this works for me, the documentation doesn't work. Using helm chats v1.18.0. Hope this help for anyone who came here. |
Description
In OpenSearch 1.3.0 we removed an explicit dependency on log4j
#1563 this caused the
log4j-slf4j-impl-X.XX.X.jar file no longer to be included in the plugin.
When the plugin started up the default no-op logger was used instead.
This prevented the security plugin from logging anything, yikes.
When looking at the other opensearch plugins, none of them use slf4.
Rather than continue using a seperate logging process, moving to the
standard log4j Logger/LogManager.
Tested this change on 2.0.0-alpha distribution and logging works as
expected.
Signed-off-by: Peter Nied [email protected]
(cherry picked from commit 54a920b)
Issues Resolved
Backport PR #1751
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.