Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

log4j or JDK 1.4 java.util.logging ?

 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!