By bloid
via techper.net
Published: Mar 10 2008 / 04:26
I just took log5j for a spin. For those who does not know, log5j is a Java5 enhancement of the log4j api. It provides two new features on top of log4j, where one is made possible by Java5
Comments
Peter Mularien replied ago:
Just to clarify - it appears this project is not at all related to the ASF log4j project - simply a facade on top of it, correct?
pulesen replied ago:
Yep, that is correct.
trevor replied ago:
The author completely misses the point of the log5j printf style logging. It is not there to make development easier. log5j first calls isDebugEnabled and then only constructs the logging string if necessary. The author's log4j alternative "LOG.debug(format("%s called me with %d", "foo", 5));" always performs the expensive operation.
pulesen replied ago:
For me, the *perceived* expensive operation is not a problem, and most of the time, for all of us, it should not pose a problem. Stop premature optimizations! Care more about code readability instead. That is my opinion. And for that, printf-style formatting is a better solution.
There has been a recent thread on this here at dzone: http://www.dzone.com/links/why_you_should_use_isdebugenabled_.html
Voters For This Link (18)
Voters Against This Link (1)