Friday, April 24, 2009

Java Logging Still Crap in 2009

When java logging API was first introduced in JDK 1.4 in 2002, it caused quite a lot a fuss around, with everybody asking "Why did not they just include Log4j instead of creating their own bastard child?".

I remember having looked at it very shortly before continuing using Log4j on all projects I have been involved with.

Today, while doing a very small project, I tried once more to use java logging. The main reason is that I was lazy to add a dependency to one more jar for this small project. While trying I found out that:
  1. you still need to use a damned JVM parameter to point to your configuration file
  2. you can not change the formatting without writing a formatter class!
It's 2009! What has Sun done? I am amazed the most elementary things you expect from a Logger are still not included by default in the JDK.

1 comment :

  1. Indeed!

    Here's a popular post I wrote about Java logging a couple years ago:

    My Soapbox for SLF4J