CHAPTER 7

image

A Complete log4j Example

To reinforce the concepts we have discussed thus far, let’s consider an application that deals with several customer orders. The application processes the orders and sends appropriate responses back to the customers. All the orders the system processes are logged and can be used for future reference. Let’s also assume that the system requires flexibility in terms of logging so that it can decide to log only orders with product codes falling within a certain range. The application will typically pass to the logging framework the order information to be printed. From a design point of view, the application will ...

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.