You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by firas mualla <fi...@yahoo.com> on 2005/09/15 10:54:47 UTC

Log4j performance considerations

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

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


Re: Log4j performance considerations

Posted by Russell <Ru...@prudential.com>.
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