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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
