CHAPTER 6

image

Extending log4j to Create Custom Logging Components

In the previous chapters, we covered the core log4j framework. We have discussed how the Logger, Appender, Layout, and Filter objects interact with each other and publish logging information to a preferred destination. Apache log4j offers a vast range of Appender objects. These give us the power to publish logging data to a local machine and to distribute logging data over a network. Moreover, the flexible and highly configurable nature of log4j allows us to change logging behavior completely by merely changing the configuration file.

All this is great and useful. Still, there may ...

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.