logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell <Russell.N...@prudential.com>
Subject Re: Log4j performance considerations
Date Thu, 13 Oct 2005 09:03:13 GMT
firas mualla <firas981 <at> yahoo.com> writes:

> I have a large J2EE web application . From
> performance(speed & memory space) point of view
> what is the best scenario to use ?
> 	1)Use one logger for each class ( this is a common
> practice but 
> 		doon't you think that  it is heap-consuming ).
> 	2)Use one logger instance at the application level,
> every class
> 	  has a reference to it.(I think it may slow down the
> application since log requests need to wait to get
> 	  the lock of the Logger object assuming that a lot
> of Logger methods are synchronized)
> Thanks
> ___________________________________________________________ 
> To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre. http://uk.security.yahoo.com

If you use just one logger defined at the parent application level you can have
as many references to it as you want; they will still be pointing to one logger.
 This will give you granularity capabilities in that if you want to separate
logging for individual classes afterward you can change it with simple
properties file changes.

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

View raw message