On Mie, 5 de Enero de 2005, 11:19, Nicola Ken Barozzi dijo: > Antonio Gallardo wrote: > ... >> Please have a look at the Torsten suggestions, looks good too: >> >> http://just4log.sourceforge.net >> >> +1 too. > > I saw that too, but UGLI should not need that extra isLogEnabled stuff > in any case. > > BTW, I love the way this makes one write log messages, it's what we have > in POI, and is very convenient. > > Ceki wrote: > " > As noted in my previous message, UGLI also supports parameterized log > messages obliterating the need to surround log messages with > logger.isXXXEnabled checks. > > Instead of writing: > > if(logger.isDebugEnabled()) { > logger.debug("User with "+id+" entered wrong query string > ["+query"]." ); > } > > you can just write: > > logger.debug("User with {} entered wrong query string [{}].", id, > query); > "
How UGLI manage the case when a parameter is a function, ie: logger.debug("User with {} entered wrong query string [{}].", myFunction(), myQuery()); Well, we know what happen here: The functions are executed to retrieve the return value. AFAIK, this is why we use isDebugEnable()? And here is where "just4log" play an important role. ;-) WDYT? Best Regards, Antonio Gallardo