Are your Java programs littered with a multitude of randomly placed
System.out.println statements and stack traces? When you add debugging
messages to a class in a project, are the outputs of your messages
interleaved among dozens of messages from other developers, making your
messages difficult to read? Do you use a simple, hand-rolled logging API, and
fear that it may not provide the flexibility and power that you need once
your applications are in production? If you answered yes to any of the above
questions, it's time for you to pick an industrial-strength logging API and
start using it.
This article will help you choose a logging API by evaluating two of the most
widely used Java logging libraries: the Apache Group's Log4j and the
java.util.logging package (referred to as "JUL"). This article examines how
each library approaches logging, evaluates their differ... (more)