This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.

The Open Source Zone


Pro Apache Log4j, Second Edition

Book cover

by Samudra Gupta

ASIN: 1590594991

See more on Amazon.com

Average Customer Review: 4.0, based on 5 reviews.

Customer reviews (5 of 5)

Best Apress publication so far..., 2007-04-30, Rating: 5.

Of all the Apress publications I've read, this is by far the best. This book provides a wonderful introduction, refresher or skill set extension for Log4J. I recommend this book for the beginner to moderate Log4J user.

Quick, concrete examples and explanations are the strong point of this book. It's fast and easy to read (I was able to read the book and work through it in a single day) and provided me with not only an understanding of Log4J, its core competencies and the business requirements that it meets, but also provided me with a creative inspiration.

Many of the topics covered can provide you with ideas of your own for existing or future applications that you are or will be working on. Reading this book will provide you with a foundation for using Log4J effectively in your own applications.

I do, however, recommend reading some of the other extensive Log4J books for more detailed information. However, this will serve you as a wonderful reference and overview of the technology.

Almost identical with excellent on-line material, 2007-03-19, Rating: 4.

This is an excellent reference. However, be aware that it does not provide much that isn't readily available in the composite of a couple of references available on-line on the Apache web site. I am very happy with the book, because I prefer to have a reference I can use off-line and at the side of my computer instead of in a window buried beneath my work.

I appreciate this book more with the passage of time, 2006-04-28, Rating: 2.

I think this book could have been written in a much clearer, more easy to understand way. I also think it could have addressed much better the real world logging issues that a developer faces on the job.
It is not entirely the author's fault. Still, logging is a crucial subject to master, and it is very frustrating in that it requires dozens of hours to understand log4j and all its configuration options and gotcha's. For example, I have never yet been able to get log4j to work in Websphere. Certainly it's my fault, but that does not change the fact that it's very hard to configure log4j with multiple class loaders in effect. This book does not address the problem of using log4j in Websphere at all. Rather, it has a not terribly clear chapter on using log4j with Bea Weblogic.
The kind of real world help that real programmers need and which this book does not address at all, is topics such as how to have logging in a java framework which is distributed as a jar file, which is then invoked in an entirely separate java application that itself uses log4j logging. For example if I include a jar file in my project that has logging messages at the DEBUG level, and my own project has messages at the DEBUG level, I want to see *my* debug messages but not see the debug messages of the included jar file. This book does not deal with these kind of real world problems at all. Nada.
I have tried reading this book several times. It is mind numbing at times in the amount of detail presented. The important information is often hard to pick out from all the other information that is less important.
Maybe I'm being too harsh. Maybe I am really criticizing log4j itself rather than this particular book. This book is a "must have" purchase for a serious programmer, but having said that it could certainly have been written more carefully and thoughtfully. The examples could have been much better planned and varied. The author seems at times a little lazy in using the same not very interesting example for an entire chapter instead of illustrating more things.
It's not the fault of the authors that log4j is needlessly complicated to understand and configure and gives very cryptic error messages. But on the other hand the authors certainly don't deserve any praise for going out of their way to make an easy to read, carefully edited book. A lot of work went into writing the book, but I still can only give it two stars because it's eating up much, much more of my time than should be necessary to absorb it.

In re-reading this review which I wrote over a year ago, I continue to agree with most of what I wrote. If it would let me however I would raise the number of stars to 3 and feel mildly guilty for not giving it 4 stars. It's actually a pretty good book, but it's crucial to be forewarned that it simply cannot be read straight through, cover to cover the way I did. It's better to hunt and peck through the book looking for the occasional useful gem hidden among all sorts of information that only an experienced power user would ever need. The hardest part for a new log4j user who reads this book is to figure out where the "20" of the classic 80/20 rule resides, versus the 80 percent of log4j that 8 out of 10 people will never need to use or know about.

If it's not in this book, maybe Log4J doesn't do it..., 2005-08-17, Rating: 5.

This is not a large book by any stretch, but it packs a lot in. There's all sorts of stuff I hope I never need to know about log4j here, and there's examples of almost all of it. It would be a bit of overkill for what I need, except that it is also very logically organized.

A word of warning, though. This book is not a simple recipe book for log4j. The examples are helpful, but they serve to illustrate the exposition of the API. If you don't want to see or understand what log4j is doing behind the curtain, you'll get a limited benefit. I am somewhere on the fence here. I've toured the book, pulled out what I can use now, and plan to return to get a better understanding of the inner workings later.

Everything you need to know about Log4J, 2005-07-25, Rating: 5.

It's disappointing that Java requires so much logging. It's an artifact of the complexity. But I can't hold that against this book. This thin tome is a well-written and illustrated walkthrough of all of the Log4J fundamentals. There are some insightful examples and good use of UML to illustrate message flows.