logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject Re: is Logger serializable?
Date Thu, 03 Apr 2003 15:17:26 GMT

Jacob Kjome wrote:
> If you make them class static variables, it is the same as marking them 
> as transient.  The recommended way to define a logger is probably....
> private static final Logger logger = 
> Logger.getLogger(MyClass.class.getName());

Is making it 'final' a performance-related suggestion (i.e., does the 
compiler optimize anything if you do this), or practice-related (no 
reason to point the var at a new object)?


To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message