Over at Tuna Ranch is an introduction on using Apache Log4j with Eclipse. Log4j enables logging at runtime without modifying the application binary. The Log4j package is designed so that these statements can remain in shipped code without incurring a heavy performance cost. Logging behavior can be controlled by editing a configuration file, without touching the application binary. “The most valuable benefit of Log4j is that it lets you change log levels before you deploy an app, meaning you don’t have to spend ages commenting out your debug code when you ship it, and uncomment again when the customer returns it to you, complaining that it’s broken.”
The introductory tutorial begins with setting up an Eclipse project, opting to keep source code and binaries separate, and goes to explain how Log4j can be used with Eclipse, with the help of screen shots and snippets of code. Examples are divided into simple and complex.