Skip to content

Conversation

@ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Mar 9, 2018

Log4j2 provides a wide range of logging methods. Our code typically only uses a subset of them. In particular, uses of the methods trace|debug|info|warn|error|fatal(Object) or trace|debug|info|warn|error|fatal(Object, Throwable) have all been wrong, leading to not properly logging the provided message. To prevent these issues in the future, I propose blacklisting these two methods.

@ywelsch ywelsch added >enhancement :Core/Infra/Logging Log management and logging utilities labels Mar 9, 2018
@ywelsch ywelsch requested a review from jasontedor March 9, 2018 17:58
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @ywelsch, good change.

@ywelsch ywelsch merged commit be7f5dd into elastic:master Mar 12, 2018
@ywelsch ywelsch added the v7.0.0 label Mar 12, 2018
ywelsch added a commit that referenced this pull request Mar 12, 2018
Log4j2 provides a wide range of logging methods. Our code typically only uses a subset of them. In particular, uses of the methods trace|debug|info|warn|error|fatal(Object) or trace|debug|info|warn|error|fatal(Object, Throwable) have all been wrong, leading to not properly logging the provided message. To prevent these issues in the future, the corresponding Logger methods have been blacklisted.
@ywelsch ywelsch added the v6.3.0 label Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants