Skip to content

Loggers should be declared non-static #969

Description

@ViToni

Loggers are declared as private static final. This can have impact when having the library deployed on "shared" classpaths.
It is prefereable to have them non-static.
If you care about serialization Loggers could be changed to be also transient.

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

Projects implementing such a policy:
https://www.eclipse.org/smarthome/documentation/development/guidelines.html#e-logging
https://www.openhab.org/docs/developer/guidelines.html#f-logging

(Have to admit these projetcs are closely related but both are supposed to support dynamic reloading of JARs/ bundles.)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions