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

Made loggers non-static to support deployment in containers #970

Merged
merged 3 commits into from Jan 20, 2020
Merged

Made loggers non-static to support deployment in containers #970

merged 3 commits into from Jan 20, 2020

Conversation

ViToni
Copy link
Contributor

@ViToni ViToni commented Jan 20, 2020

The slf4j Loggers were changed to be declared as non-static.

Description

The slf4j Loggers were declared as private static final. This has been changed to private final.

Related Issue

Fixes #969.

Motivation and Context

Usage of private static final loggers (or other classes in general) can be problematic it environments with shared classpaths and dynamic loading/unloading of JARs.

For reference see:
http://slf4j.org/faq.html#declared_static
https://cwiki.apache.org/confluence/display/COMMONS/Logging+StaticLog

How Has This Been Tested?

No functional changes were introduced by this change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    (There were some failing tests before this change. The same ones are still failing.)

Signed-off-by: Victor Toni <victor.toni@gmail.com>
Signed-off-by: Victor Toni <victor.toni@gmail.com>
@marci4 marci4 changed the title Made loggers non-static to support deployment in containers Made loggers non-static to support deployment in containers Jan 20, 2020
@marci4 marci4 merged commit ec0fa03 into TooTallNate:master Jan 20, 2020
@marci4
Copy link
Collaborator

marci4 commented Jan 20, 2020

@ViToni thx a lot for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loggers should be declared non-static
2 participants