CHAPTER 5

image

Filtering, Error Handling, and Special Rendering of Log Messages

In previous chapters, we have dealt with three main components of Apache log4j: Logger, Appender, and Layout. In this chapter, you will learn how to filter the logging messages by applying different filtering criteria. You will also learn about specialized error handling mechanisms and examine how to translate application-specific domain objects to a format that log4j understands.

Filtering Explained

The process of making decisions about printing the logging information associated with each logging request is known as filtering. The decision whether to accept or reject ...

Get Pro Apache Log4j, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.