 |
Log messages can be seen as a kind of executable documentation. They are a very powerful tool for post mortem debugging, especially when combined with test frameworks like JUnit. For Java there are two major logging frameworks: Apache Log4J and the native Java logging API, introduced with J2SE 1.4.
Log4J is the model after which the J2SE logging API was built. However, Log4J has more features, more tools and runs on more Java versions. The Logging Framework needs at least J2SE 1.4. There are many Log4J derivatives e.g for C++, Perl, PHP and even for the .NET framework.
A list of all features, extensions and tools can be found on the home page. Very useful is Log4Unit, an extension for Log4J that enables it to create test protocols for JUnit test cases.
Articles
Discussion about Log4J
|