Features
- Cover Type: Hard Cover with 224 pages
- Published by: Apress
- Edition: 2nd Edition June 22, 2005
- Written in: English
- ISBN 10 Number: 1590594991
- ISBN 13 Number: 978-1590594995
-
Book Dimensions:
9.2 x 7.2 x 0.8 inches
- Weighs: 1.3 pounds
Product Description
In development scenarios where things can't be run in a debugger, or when you run the risk of masking the problem, logs are the greatest source of information about running a program.
Pro Apache Log4j, Second Edition provides best practices guidelines and comprehensive coverage of the most recent release.
Step by step, the book explains core concepts, from basic to advanced. Code samples are in Java and include guidelines for different application-specific needs. You'll also learn how to extend the API to write custom components and best practices for using the feature-rich log4j API. This book concludes with enterprise Java applications using log4j with JSP and J2EE.
About The Author
Samudra Gupta has more than eight years of experience in Java- and J2EE-related technologies. At present, he is working as a Java/J2EE consultant in the United Kingdom through his own company, SSG Solutions Ltd. His domain expertise is in the public sector tax and information content management systems, retail industry, and e-commerce&emdash;based applications. He holds a post-graduate degree in information technology and management form All India Management Association, New Delhi, India. Gupta actively contributes articles to Web sites, magazines, and journals such as
JavaWorld and
Java Developer's Journal, and is a monthly contributor to JavaBoutique. When not programming, he loves playing contract bridge and 10-pin bowling.
Reader ReviewsI 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 eighty percent of log4j that 8 out of ten people will never need to use or know about.