Skip to content
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.x] Switch to log4j logger (#1751) #1789

Conversation

DarshitChanpura
Copy link
Member

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)

Description

  • Category : Refactoring

Issues Resolved

Backport PR: #1751

Testing

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

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)
@DarshitChanpura DarshitChanpura requested a review from a team April 25, 2022 20:09
@peternied peternied changed the title Switch to log4j logger (#1751) [Backport 1.x] Switch to log4j logger (#1751) Apr 26, 2022
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge DarshitChanpura#3 to resolve some files that were missed

@peternied
Copy link
Member

@DarshitChanpura Looks like there is a build issue with the changes

Signed-off-by: Darshit Chanpura <[email protected]>
@peternied
Copy link
Member

@DarshitChanpura Looks like there are still some failures. Note; I don't think we need to merge this into 1.x as we don't have plans for 1.4 at this time. How would you feel about tabling this PR?

@DarshitChanpura
Copy link
Member Author

@DarshitChanpura Looks like there are still some failures. Note; I don't think we need to merge this into 1.x as we don't have plans for 1.4 at this time. How would you feel about tabling this PR?

Seems like it is failing due to check style violations. See here

yes.. we can table this PR for now!

@peternied peternied closed this Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants