Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

log4j or JDK 1.4 java.util.logging ?

 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone have any opinions on the relative merits of these two, whether one is more or less feature-rich, or offers better or worse performance?
Any comments most welcome.
George
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote an article on jdk 1.4 logging for the javaranch newsletter a couple of months back. Java's built-in logging is not as feature reach as log4j and they are not interchangeable. But jdk 1.4 logging is probably good enough for most applications.
 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Jakarta Commons Logging in conjunction with Log4j
http://jakarta.apache.org/commons/logging.html
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Thomas mentioned log4j is more feature rich. I would say a lot depends on how important logging is to your application.
If it's mainly a debugging tool then either one is good enough.
If you plan to log a lot of stuff in production and need a fancy logging mechanism, I would say go ahead with log4j. Both the libraries are stable enough for basic needs, but in case you run into a problem/bug you are more likely to get help from the log4j community. Of course there are no guarentees as to whether your problem will get fixed but with log4j the source is there for you to hack. The release cycle for log4j is also much shorter than it is for the jdk.
HTH
Ravi
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic