[infinispan-dev] trace vs log.isTraceEnabled
Mircea Markus
mircea.markus at jboss.com
Wed Sep 28 12:35:37 EDT 2011
Hi,
I'm not aware of any convention on using trace vs log.isTraceEnabled() to guard the trace statements.
if (trace) log.trace("some request related stuff")
vs
if (log.isTraceEnabled()) log.trace("some request related stuff");
The former is more efficient, but cannot be managed at runtime. It seems to be the preferred form, so shall we stick with it?
Cheers,
Mircea
More information about the infinispan-dev
mailing list