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

Rule:  JavaLogging1Checked automatically with code checker

Synopsis:Class contains more than one logger.
Language:Java
Severity Level:2
Category:JavaLogging


Description:
Normally only one logger is used in each class.
class Foo{
    Logger log = Logger.getLogger(Foo.class.getName());
    // It is very rare to see two loggers on a class, normally
    // log information is multiplexed by levels
    Logger log2= Logger.getLogger(Foo.class.getName());
}