TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  JavaLogging2Checked automatically with code checker

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());
}