devxlogo

April 18, 2018

Should Log Instances Be Static or Not?

Private static final Log log = LogFactory.getLog(MyClass.class); It is a good idea to store the log instance in a static final variable, because: No problems with serializable classes Initialization cost