Difference between revisions of "Poor Logging Practice"
Revision as of 19:05, 17 February 2009
This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.
Last revision (mm/dd/yy): 02/17/2009
Loggers should be declared to be static and final.
It is good programming practice to share a single logger object between all of the instances of a particular class and to use the same logger for the duration of the program.
The following statement errantly declares a non-static logger.
private final Logger logger = Logger.getLogger(MyClass.class);
Related Technical Impacts