Synopsis: | The Logger variable declaration does not contain the static and final modifiers |
Language: | Java |
Severity Level: | 4 |
Category: | JavaLogging |
Description: |
In most cases, the Logger can be declared static and final.class Foo{ Logger log = Logger.getLogger(Foo.class.getName()); // It is much better to declare the logger as follows // static final Logger log = Logger.getLogger(Foo.class.getName()); } |