Abstract

In this chapter, we discussed a newly released tag library, Log, for using log4j within a JSP to perform logging. This solves the age-old problem of how to establish controlled logging from within a JSP. By changing the configuration, it is possible to redirect logging information to any preferred destination in any desired format. But careful consideration is required before you include in your Web application CPU-intensive logging operations such as writing logging data to a database, as it might affect the performance of that application.
This brings us to the end of the log4j discussion. All the topics explained in Chapters 2 through 9 should help you understand the internals of log4j and how to use it in practical applications. The smaller examples in these chapters should enable you to grasp the concepts presented and see quick results to better understand the use of log4j. The more extensive examples should help you correlate the use of log4j with real-life applications.
There is always more to learn about any topic. But we have created a skeleton and given it a shape, and now you are in a position to build on it. In Chapter 10, we will look at some of the best practices involved in using Apache log4j.

Fulltext Preview

Image of the first page of the fulltext document