The Java Logging Mess

Discussions

News: The Java Logging Mess

  1. The Java Logging Mess (9 messages)

    Every application needs logging. And right now there are a lot of options on what exactly to use for logging in Java. The most famous frameworks are: log4j, logback, commons-logging, slf4j, java.util.logging.

    And there are a lot more – every now and then someone decides to write his own logger – just go to the Open Type dialog of your IDE and type “Logger” (not to mention that some use the name “Log”). And there’s also the ServletContext.log(..) and stuff like that. It is indeed a mess. But let’s start with some history (note: here’s another post on the topic).

    First there was System.out and System.err. But they were inflexible, so a need for a feature-rich logging has arisen (note that I was in elementary school at that time). Logging that can be customized format, that can go to multiple targets – files, consoles, emails, etc. So log4j has appeared – in 1999.

    Check out the rest of the article at the following URL:

    Java Code Geeks: The Java logging mess

    Threaded Messages (9)

  2. Weak...[ Go to top ]

    ...go read bileblog of 5 years ago :)

  3. What's up with JCG?[ Go to top ]

    lately there's been a lot of lame articles from JCG. what is up with that?

  4. Lame?[ Go to top ]

    How do you judge this (or any) article as "lame"?
  5. Lame?[ Go to top ]

    How do you judge this (or any) article as "lame"?

     

    I compare it to articles that have greater detail, better examples and more depth. Over the last 10 years, there's been dozens of blogs, talks and articles about these same topics. Some of the JCG articles appear "superficial" and introductory to me, but I'm jaded.

  6. ...[ Go to top ]

    Sometimes too many details are distracting readers. I wouldn't read a 5-page long article about logging, for example. And another thing - you are in the industry for 10+ years. There are people starting just now, and they haven't read all the articles that you have.
  7. What's up with JCG?[ Go to top ]

    lately there's been a lot of lame articles from JCG. what is up with that?

     

    That's what I thought when I saw this "Java Concurrency Tutorial - Semaphores" from the java code geeks. But later on they have some other articles about most of the concurrency things I'm interested in (Lock, Thread Pools, BlockingQueue, CountDownLatch ...), I re-thought that those guys had something to read. I don't know how good those articles are, but I intended to read them in a few days.

  8. Post Execution Logging[ Go to top ]

    I agree, Java logging has been problematic for some time.  Apoliges for the shameless plug, but I think we have a pretty elegant solution to the whole logging mess problem.  It might be interesting to you:

    http://www.chrononsystems.com/post-execution-logging/

     

  9. logging or debugging[ Go to top ]

    sorry, but is your product a replacement for logging or debugging??  i dont see how a production application can do without logging *or* how your product works for an application in production...  do you have a demo with a non-trivial piece of code, ideally something that runs in a web container?

  10. logging or debugging[ Go to top ]

    Well, let me try to explain it:

    'Logging' is what you currently use to 'debug' your long running server side applications.

    You cant use your normal debugger for those applications because it is fundamentally not built for it. I mean if you had a program which ran overnight and then crashed, how would you debug it using breakpoints? Would you place a breakpoint and wait for another night?

    That's why we came up with the idea of a time travelling debugger. It allows you to jump to any point in time instantly without waiting and see all state. That combined with the fact that you can 'step back' and see what was it that 'caused' the issue in the first place.

    The post execution logging allows us to take all the good parts about logging, like being able to see an 'overview' of the execution of your program at a glance, while leaving out everything that is bad about it, ie cluttering up your code, trying to predict errors etc.

     

    As for usage in production, we have a separate product called the Chronon Recording Server, built specifically for that:

    http://www.chrononsystems.com/recordingserver/

     

    If you want to see Chronon recording a non-trivial, huge application, please look at this video of our recent webinar where we show Chronon recording 'Atlassian Jira', a huge, popular and definitely non-trivial product:

    http://www.chrononsystems.com/chronon-webinar-video/