«« Next » « Previous
«« Next » « Previous

Link Details

Announcement

iPhone DZone: Fresh Links On Your iPhone by matt at Sat Jul 05 14:09:51 EDT 2008

Reading DZone on your iPhone just got a little bit easier. Visit http://dzone.com/iphone from your iPhone to try out our beta iPhone support. You can view stories, filter by tags, and login. We'd appreciate your feedback at feedback@dzone.com.

Apathy is the suck. Login and vote now.
Link 69937 thumbnail

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
  • 18
  • 1
  • 2323
  • 992

Comments

Add your comment
User 169014 avatar

Peter Mularien replied ago:

0 votes Vote down Vote up Reply

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?

User 52357 avatar

pulesen replied ago:

0 votes Vote down Vote up Reply

Yep, that is correct.

User 219537 avatar

trevor replied ago:

0 votes Vote down Vote up Reply

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.

User 52357 avatar

pulesen replied ago:

0 votes Vote down Vote up Reply

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

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.