Not logged on Personal page Log in
Home Products & Services Contact Security & Privacy
By Ceki Gülcü
202 pages
Updated on Feb 2010
Price: 5.67 (USD)

Table of Contents
Reader reviews

Add to Cart
  View Cart 

The complete log4j manual

The "complete log4j manual" documents version 1.2 of the log4j logging framework. In over 200 pages and dozens of concrete examples, it covers both basic and advanced log4j features:

The complete log4j manual describes the log4j API in considerable detail, including its features and design rationale. Authored by Ceki Gülcü, the founder of the log4j project, the log4j manual is intended for developers already familiar with the Java language but new to log4j, as much as for experienced log4j users. With the aid of introductory material and many examples, new users should quickly come up to speed. Seasoned log4j users will also find fresh material not discussed anywhere else. Advanced log4j topics are also covered in detail so that the reader can harness the full power of log4j.

Reader reviews (maximum 5 stars)

Readers are very much encouraged to enter a review (login required).

Vladislav Khavin, Lawrence, KS

The Complete Log4J Manual was an invaluable tool that got me through some tough spots in the development stage of my project. We were faced with a very aggressive deadline, and needed answers fast.

This book was very well written with lots of examples, and let me find what I needed very quickly and move on with development. I can't think of a better thing to say about a reference book. It helped me get what I needed when I needed it.

Leonard Lehew, Raleigh, NC

I had used log4j quite a bit before I got the manual. Even so, the manual has saved me a lot of time. I provides clear documentation on aspects of log4j that are barely covered by the standard documentation. Indeed, browsing through the manual, I picked up on some very useful features that I had missed and that we are now making good use of.

Pedro Nevado, Madrid, Spain

Very good to get an insight of log4j architecture. I used log4j in several small scale projects. Recently I have been working in a big scale mission critical project, where logging is an important issue.

I have used this book to implement a little bit more sophisticated configuration files that those that I have used before.

David Wong, Sydney, Australia

Generally very good for learning Log4j (I would actually give it 3 and a half stars). For more advanced usage, such as customization and overriding some of the default classes, I did not think it went into enough detail. I still had to go to the articles on the Log4j website, search on the internet, and eventually dig into the source code to get the details I needed.

Denis Benoit, Montreal, Canada

This book has all you need to know about log4j, it is very practical, it gets to the point fast, it contains all the necessary details, without losing the reader in the details. I very much recommend it.

Bob Corcoran, NetPlato Inc., Rocky Hill, CT

I needed to quickly add logging to a project that had to be delivered within a few days. The log4j manual helped me meet the deadline. It is clearly written with detailed explanations of all relevant topics. I highly recommend The complete log4j manual.

Mark Hall, IBM, Marietta, GA

The complete log4j manual is a comprehensive and well-written document. I was quickly able to master advance logging features after reading the manual. I strongly recommend this manual as the first place you look for log4j information.

Robin Joinson, University of Manchester, United Kingdom

Prior to using log4j, I had no understanding of 'logging frameworks' in Java and no idea what they could do. Reading the documentation on the log4j web site got me started, but it soon became clear that to make full use of the framework, a comprehensive and detailed manual would be required.

The Complete Log4j Manual does the job admirably and it has certainly proved to be indispensable as a tutorial and a reference for adding 'real world' logging capability to web applications.

Luethje Claus, Osys AG, Zurich, Switzerland

Log4j is extremely powerful and the book is a valuable companion. Especially, if you're trying to use the advanced features of log4j. The book is very well written and quite easy to understand, even if english isn't your first language. As there is really no project without log4j, the log4j manual is always at hand.

Daniel Bergdahl, Cybercom Syd AB, Sweden

Great manual, fun to read. It describes everything necessary to work with log4j. The provided examples are very good and very useful. The book seriously added to my productivity and contained everything that I had expected.

George Janczuk, Object Consulting, North Sydney, Australia

I have been doing some work on log4j configuration this week and have been referring to the log4j book extensively.

In particular, I have been trying to improve logging at a client production site where currently the configuration is very minimal (ust output straight from a tomcat web application to a dailyrollingfileappender. Our customer has HP and IBM running their infrastructure and application level 1 and 2 support, and they often copy whole web apps and replicate them, without reconfiguring files (such as the file). This causes problems with multiple applications trying to write to the same file. We have also had performance problems related to the particular volume to which the files are being written to running out of space.

I have been investigating the async appender, socket server and socket appender as well as the BufferedIO setting, to set up a centralised logging facility (well, at last one that runs on the same machine) as well as the use of NDC to better identify where the log comes from and the use of different loggers and disabling of additivity to allow the various log streams to be separated back in to separate files on the socket server end.

Without the book obtaining the information to implement this level of sophistication would not have been feasilble. The book has made this all possible, and even easy!

I'm definitely looking forward to log4j v1.3 (and the book update to match).

Russell Healy, Wellington, New Zealand

I have found this manual to be very easy to read. It is easy to find what I am looking for. The manual explains the concepts behind log4j as well as providing detailed instructions for use. I particularly appreciated the coverage of XML configuration. An excellent resource.

Steve Keller, Electronic Arts, CA

The manual is complete, but lacking in tutorial or examples. I got much more out of looking at the sample code that comes with the manual than reading the manual itself. In fact, the main reason I give the manual a 3 star rating is the wide variety of samples.

Troy Anthony, Oracle Inc., El Granada, CA

A concise manual with clear, useful examples. Information provided in this manual enabled us to use log4j to build a simple, reliable logging system in to our java applications.

Of course having to enter over 200 words to describe how wonderful this manual is seems a waste of time. Excess verbiage is something the author mostly avoids in the log4j reference manual - perhaps the reviews need do the same?

Michael Herren, Bern, Switzerland

The log4j manual was of greate help. Weeks ago I had to write a log-module which digitally signs it entries. With the use of Log4j I had the base I was looking for. All I had to take care was the signature. With the help of the log4j book it took a few days to write the module. It gives the reader a overview of the concept and architecture of Log4j. But it also helps to enhance Log4j with the functionality which is needed in a special project.

Bob Rogers, Bell/CGI, Ontario, Canada

I enjoyed "The complete log4j manual" very much.

It's well written and the examples were very valuable. The only thing I thought was missing was a chapter on configuring log4j to work with a data base. That would have been help full.

The other topic that I find very confusing/frustrating (mainly because I could never figure it out) was how to incorporate log4j into a Web application and be able to change the log4j configuration without having to restart the application. I know that this is a implementation problem, but some guidelines in this area would be helpful.

Tyler Jensen, Mapleton, UT

I found the log4j book supremely helpful despite the fact that I'm using the .NET port log4net. The language was precise and clear and finding the information I wanted was easy. Thanks again for making it available.

Al Hopper, Plano, TX

I can't recommend this book highly enough! The software, the book and its author are simply first class and set an example for all of us to emulate! Log4J is a complete logging sub-system. As such, it is relatively easy to begin using - but making use of it's full potential requires you to learn it, and the book gets you there in a very reasonable timeframe. It then becomes invaluable as a desktop reference to the software.

Don't "waste" any time reading the other reviews - they only say the same thing I've already said! :) Just buy the book and it'll help you add world class logging functions to your java projects.

Mark Vedder, Rochester, NY

This book does a great job of not only explaining the log4j API, but how, when, and why you should use logging. The book's layout is well thought out & flows nicely. So much so that it is one of those rare tech books that works very well both as a tutorial that can be read cover to cover, and as a reference manual.

Perhaps the best feature of this book is that it explains the XML based configuration of log4j very well. When first learning log4j, I read many articles and much documentation that stated that instead of using the older and less powerful properties based configuration file, one should use the XML based configuration files. However, none of them discussed or explained the XML based options. It was (apparently) left to the reader to read the DTD to learn such. Like many, I find reading a DTD from start to finish neither enjoyable, nor a good way to first learn an XML's available options. Thanks to this book, I was not forced to spend a weekend painfully doing such.

Juan Antonio Zaratiegui Vallecillo, Madrid

I promise I will not read this manual in its entirety. Its structure is so well done I can locate the features I need without having to lose time browsing the pages. It has been less than half an hour from installing to using log4j with the aid of this book. Really nice, really useful.

Igor Topalov, North York, Ontario

I'd only wish to all other Java products to have manual like that. (Only IBM's redbooks surpasse it). Quality of the manual matches product itself and is absolute "must have" for anybody involved into development and support. (Otherwise one remain unaware of all the log4j features that can be used, or use them not to full extent). I join one of the previous opinions - "concise and to the point", but at the same with ample examples.

Jeff Barczewski, SnowFlight Corporation, Ballwin, MO

The manual is great, and I especially loved the ability to download it immediately since I needed the information for a project I was working on and was able to retrieve it in the middle of the night.

The author is also very responsive to emails, updating the documentation frequently and really concerned with customer satisfaction. Don't hesitate to buy this manual, if you use log4j then you can't afford to not get it, and getting the frequent updates keeps you current unlike buying a book that is outdated soon after you purchase it.

Andrew Whelan, Mattydale, NY

The book is proving to be very helpful for us on a large government based project.

One thing I can note that I found lacking that I would like to see more is for Syslog and NTEvent appender configuration. An example configuration that would be used by the PropertyConfigurator and/or DomConfigurator that would use the built in log4j functionality. EG: Something like the configurations below:

        log4j.appender.syslog =

Just a thought

Tom Stevenson, Crofton, MD

An excellent, concise, yet, thorough coverage of LOG4J with illustrative code samples. You need no other documentation to truly understand the power of LOG4J. This book allowed me to establish an enterprise wide implementation of system logging, utilizing LOG4J and JMX MBeans.

Viktor Lioutyi i2 Technologies Inc., Toronto

I liked "The complete log4j manual" very much. It was very easy to read and I covered all pages in just a couple of evenings. The book included all information that I wanted to find about log4j.

It would be useful to have more information about logging packages that were inspired by success of log4j (like log4c) and about different tools used to work with log files. In big companies usually multiple languages are used and log4j has serious advantage over other logging packages because it was "ported" to other languages.

Probably the only feature I wanted in log4j is to have multiple parameters for logging calls to avoid String concatenation when logging is disabled. The workaround with additional condition around is possible but multiple parameters would look nicer.

Maria Neal, Essex Corporation

The book was very informative and well written. All the information I needed to start using Log4J was available in the book. Using Log4J in my web application has added needed functionality without the cost of having to create my own logging capability. It is great to know the industry is helping to improve the tools for web development. Thanks!

Stephen Byrne, Rochester, NY
The examples are well explained, appropriate to the text, and work. I cannout count the number of examples in books I've run across that simply do not work. The text is clear and well ordered. So rarely is somebody so involved in the development of the product able to teach a newcomer. If only page numbers in the index were links.
Mel Haynes Jrw, Littleton, CO

This is a great book for learning how to use the log4j and once you learn all you need to learn, it works as a great log4j reference manual for those moments when you realized you can't retain everything you read ;)

I started using log4j after I realized the built in logging in the JDK was not sufficient for my needs and after having some problems relying on just the log4j javadocs ( even though its a good document ) I bought this book and was able to fully implement ( and understand ) all the advanced features of this great tool. This book is a must own for anyone wanting to use log4j.

Roger Trimble, Denton, TX

The book provided an excellent overview and detailed examples of log4j. As an example: A jvm flag IgnoreTCL=true, I could not readily find information on the net, but immediately found it in "The complete log4j Manual". Thanks again for being so thorough.

Stefano Giordano, ALBIS SpA., Italy

The complete log4j manual is a very useful reference for log4j and the examples are quite clear.

Very well done and good value for money.

Also the shopping experience was very satisfactory and the shipping was fast.

Steve Signor, Lawrenceville, USA

The complete log4j manual is very well written with easy to understand examples. A must have. This book has gone around the office many times. We use log4j extensively and this book has helped with the design and implementation of a robust loggng system based on log4j.

Bruce Snyder

If you want to know all about Log4J, this book is fantastic. Not only does it explain the internals of Log4J, but it also explores many facets of extension. Reading this book clarified some complex topic areas for me as well as just made me more Log4J knowledgeable. Well done Ceki! I hope to see you at ApacheCon again this year.

Ceskly Web a.s., Czech Republic

I bought this book at the end of a project to see if I could benefit from it for the next project. What I found was that we had done so many things the wrong way, I would sometimes laugh as I read the book, if you can imagine that... Reading "The complete log4j manual" is so much better than guessing or trial and error!

Robert Schmid, McCaa Webster & Associates, Inc.

This book is a must have for anyone intending to use log4j. It clearly and concisely guides every user, whether beginner or advanced, to the next level.

After using log4j and reading this book you will wonder why Sun every bothered building a new logging framework into the JDK. Log4j is clearly superior and this book will show you why.

RLB (customer wishes to remain anonymous)

I had used log4j very simply, copying examples I found online that used .properties files. Various online articles hinted that more complex things were possible with log4j. I had started a new job that needed log4j expertise and decided to buy the book.

I read through it in a few days and gained a much better knowlege of how log4j works, the kinds of objects you can define, and how they work together.

I used the knowlege to define an SMTP appender for our application server that notified us when an error or fatal error occurred. I also wrote the Java bit that goes with that kind of appender (forget the details, sorry.) Strangely, the manual also helped me understand java.util logging when I also had to write that kind of implementation of our abstract logger.

One of my co-workers was trying to set up a complex set of JMS Q appenders by guessing at how they worked. He was very gratified to suddenly find I had the "The complete log4j manual". He borrowed it and kept it for so long I had to go and get it back. Later, I was able to debug and fix one of these JMS Q appenders, using data in the book. We were continually repossessing the book from each others' desks.

I don't know everything about log4j, but I'm confident that if I had to do any log4j task, I'd be able to do it with my trusty book in hand. I'm in a different job now, and my ex-co-worker will have to buy the book himself. ;-)

Brian Finch

"The complete log4j manual" is very well written, and it has been very helpful to me in learning how to use the logging facility you have designed. I am actually using log4cxx, a C++ derivative of log4j, but cxx hews closely enough to log4j that I can learn everything I need to know from your book.

Congratulations on a very useful tool (and the documentation to go with it!).

Valerie Wagner, SRI International

5 STARS for log4j!! 4 STARS for the manual because there are a few things I'd like to be able to do, and I still haven't figured out if log4j can do them. (For example, I want to use the logging methods that allow you to pass an Exception into them. I want the log file to have the exception's stack trace in it, but I don't want the console appender that the user will see to have the stack trace in it.) Now perhaps that info is in the book, but I'm just using it as a reference manual. No amount of searching through the book as given me any idea whether I can do these sorts of things.

Otherwise, the book is great! I wanted to use the XML properties file configurator, and this book is the only place where this is documented. Hence if I wanted to use log4j and XML, I had to buy the book...

Magnus Palmer, Alfa Laval Lund AB

A really neat work. If you ever wanted an easy and great way of logging to your application, buy and read this book and you'll never write a System.out.println statement to debug or log ever again...

It's a nice "this is what you need to know" and how to apply it.

I now use log4j in practically everything I do. I've also implemented it in old code modules. One of my two favorite computer books and the only one on my desk. (My other favorite is "The Practice of Programming" by Brian W. Kernighan and Rob Pike that is actually quoted in the log4j manual.)

Keep up the good work.

Chad Helms, Wal-Mart

"The complete log4j manual" has already paid for itself! My team has used it extensively.

Edward Bicker

I am very much involved in utilizing the logging procedures that are defined in this class. The book is very useful and I could not do the same work without it. I am impressed with its clarity.

The Logger class has many benefits and we have implemented this class within our companies code base. It has proven to be very useful and all developers like its display characteristics.

David McCann

A very informative book, especially on the behaviour of the various log4j appenders. One thing I think is glaringly missing, though, is a description of the MBeans in log4j. I'm sure I'm not the only developer working on a project where being able to turn logging on and off at runtime via a JMX console is a great timesaver.

Jo Wyns, Compu-Mark

The log4j manual is concise and to the point.

It is suited for both developers learning how to plug log4j into their code as well as for system engineers wanting to tune log4j configuration on a production system.

Within as little as 30 minutes I had already learned a few important log4j features I was not previously aware of. This book is a must have for all organizations using log4j.

Najib Coutya

A complete manual it is.

This manual fundamentally covers the subject (log4j). It was extremely helpful to me when I was trying to implement a wrapper around Log4j. It also works as an excellent reference covering every subject in Log4j.

Thank you Ceki.

Phil True

Highly recommended read!

If you've not used Log4j before this will get you up to speed in no time. If you're considering the logging API in Java 1.4 this will convince to stick with log4j. I've been using log4j for a few years and I had no idea of all the features I was missing! The samples alone are worth the price of the book.

Patrik Tennberg, Cinnober Financial Tech
Well written book that gently teaches you the basic of log4j before it starts to cover the more advanced topics in log4j. My only complaint is that tautologies are used to often and the content could be more streamlined!
Brian DeHamer, Hewlett-Packard Co.
This book is a must-have for anyone doing serious development with log4j. It's an excellent log4j reference that really helps fill in the gaps in the online user guide. The chapter on extending log4j was especially useful. Keep up the good work.
Scott Burns, TRC Inc.
If you are going to use log4j, then buy this book straight away. Period.

The complete log4j manual will help you. It will help your team. It is very well written, a quick and easy read to get you going. It provides in depth coverage as begin to use log4j more extensively in your applications.

You will submit less posts to the users or developers list by doing so. It comes in handy as a reference guide. It does not cost that much. It ships fast, even from Europe to the states. It rocks, just do it :)

Leo J. Hart IV, Fidelity Investments
This is an excellent reference for log4j topics. I was not able to find anywhere near the amount of log4j information as I did in this manual.
Guillaume Moulard
This book save a lot of time to all the advanced users of log4j. I'm a key contributor to log4plsql project, I looked further into all subtlety of log4j parameter setting.
Brian DeHamer, Hewlett-Packard Co.
The log4j manual is a must-have for anyone doing serious development with log4j. It's an excellent reference that really helps fill in the gaps in the online user guide. The chapter on extending log4j was especially useful. Keep up the good work.
Michael Lutz, Siemens
Ceki's book is outstanding. Most questions asked on the user group are answered directly and thoroughly in the book. If you have been tasked with owning logging for your development team and are planning to use Log4j, purchase the book.

Read it. Enjoy it.

The quality of the solution you produce will pay for the investment many times over, not to mention you'll be your organization's log4j expert.

Charles Kiviö, Anite Travel Systems Ab Ltd.
This log4j manual has helped us enormously when implementing log4j in various projects. Straight to the point, well written, has good examples. Our developers have been encouraged to read it in order to see what log4j offers. Excellent to use as reference, it offers suggestions, ideas on how to use log4j capabilites to the fullest.
Michael Colynuck, Sierra Systems

Using other found docs, trying to decipher existing property files and working on an application that employed log4j completely incorrectly did not help my confusion.

After reading the log4j manual from cover to cover, I know feel not only confident that I can implement log4j the way it was intended, but also in the way most suitable for my own purposes. I found out how to do things I previously thought were impossible! It's now all so much clearer and seems so simple to use that it's frightening to think of the mess I used to be in.

A thoroughly detailed and well written book, well worth the money (in anger management alone! ;)

Heinz Hemken
While I have not finished the book yet, it is a quick, concise read. The last thing I wanted was some 1000 page tome full of lengthy, intricate code. log4j is surprisingly elegant and unobtrusive. One does get the feeling that many things were tried, and only the few things that worked well were conserved.
Mark Masterson
Excellent log4j reference. I'm the author of the SNMPTrapAppender, and I learned a raft of new things about appenders and the overall log4j architecture from this book. Very useful.
Göran Löwkrantz
The complete log4j manual covers it. With this and the javadoc, I have had no problems with log4j at all. We even managed to build an accounting backbone using log4j and a JMS server and, with the knowledge from the manual, this works like a charm.
Padraic Renaghan
Concise. Too the point. Good as intro book as well as for exploring more of the powerful features of log4j.
Eric K. Reid, Raytheon Company
While I haven't read "The complete log4j manual" in it entirety, it has been a great reference manual. I am a beginning log4j user, and this book is full of great examples of everything from simple logging, to more advanced topics like creating your own appenders. I found the section on configuration of log4j using XML especially helpful. I can't imagine using log4j without a copy of this manual close by.
Justin Hopper
Contents: I have hovered over the link to buy this book more than a couple times and then have always hesitated because I felt I was getting enough from the documentation and other articles. One day, after an experience where I felt that I just didn't understand it all, I purchased the log4j manual. I am happy that I did.

Ceki has written an excellent book that is neither dry nor filled with fluff. It goes straight to the core of the architecture and within a couple of chapters had shed some light on the darker corners of Log4J usage and architecture. This book is very well written and his mastery of the English language puts a lot of American authors to shame. Don't hesitate to get this book if you or your company are making use of Log4J. It will be worth every bit you paid for it when you learn how to get the most out of Log4J.

Good job Ceki!

Payam Fard

Very good manual with sufficient details of the Log4J package. The only think missing is details on how to customize JDBCLogger.

Great book overall.

Rodney Delanty
Superb coverage of log4j in a succinct, readable style pleasantly devoid of all the padding so prevalent most books in the computer field. The book covers all of the essential concepts from beginner to advanced to get you up and running.

Logging is something that is often bolted on to a program as an afterthought. Log4j and this book will help make programmers regard it as an integral part of their applications from step 1.

Michael Rask Christensen IBM Global Services, Denmark

Due to my general workload at the moment, I haven't got the time to make a long review on "The Complete log4j Manual", but in short I found it great! I read through it over a weekend, and in a few hours I understood more than several days of peeking into the log4j source code would have given me. I only missed one or two enhancements, which are just like jam on the top of the ice cream (nice but not strictly necessary), and that would be some practical examples of how to integrate log4j with the Windows event log or how to integrate log4j with tools like Tivoli for surveiliance. But at the end of the day, it is a book, which I would recommend to any one working with log4j!

Ruslan Zenin UBS AG

The complete log4j manual has useful sections with explanation of log4j properties syntax. I recommend having a copy of this book as a reference material about log4j. I find it quite convenient. I did buy it from this web site and did not have problems with my credit card after that. The book was delivered in time with invoice included and in good condition.

Grant Bremer
I've been using log4j shortly after it was released to open source, some two or three years ago or so. And it's been wonderful. Every project I have been on I have used it or lobbied for it until it is adopted. Log4j is flexible, powerful, and easy. It's easy to use and easy to configure.

I admit I really needed the book for just a couple things. I wanted to see what the strategies were for using log4j with EJBs and with web applications. The answers were there, and clearly presented and exactly what I needed. Thanks for writing the book, and more importantly, thanks for writing log4j. It's been a big difference in my life.

Brooke Hedrick
This is a well thought out beginner to advanced level manual. I started reading it on a Thursday afternoon and by Friday morning, I had a very complete understanding of how to implement log4j as well as how log4j really works. Ceki has provided readers with just the right amount of information consumable in a reasonable amount of time.
Robert Blumen
This is a great manual. It contains a sufficient amount of detail to use the package. It supplies examples of proper usage as well as discussing the principles involved. And it provides hints and warnings for typical errors that can be avoided.