Chapter 9. Logging

There is life beyond System.out.println().

As applications become more sophisticated, it’s important to have a mechanism for managing what can eventually become a torrent of informative and debugging information issued to the console. Over time, different systems have been developed for printing messages based on the severity or importance of the message. For example, Java defines two output streams—System.out for normal messages and System.err for warning messages.

Over time, a variety of toolkits have appeared to provide more sophisticated solutions, including Log4j ( and the introduction of a logging toolkit in JDK 1.4 ( These logging ...

Get Apache Jakarta Commons: Reusable Java™ Components now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.