Book 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.
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
- Chapter 1 Introduction to Application Logging
- Chapter 2 Understanding Apache log4j
-
Chapter 3 Destination of Logging—The Appender Objects
- Properties of Appender
- Thread-Safety in log4j
- WriterAppender
- ConsoleAppender
- FileAppender
- Rolling in Multiple Files—RollingFileAppender
- Rolling the File Daily—DailyRollingFileAppender
- A File-Based Logging Example
- Logging Asynchronously—AsyncAppender
- Sending Logging Information to Remote Destinations
- Logging to a Database with JDBCAppender
- Implementing JMS-Based Logging with JMSAppender
- Working with SocketAppender
- Logging to Windows NT Event Log with NTEventLogAppender
- E-mail the Logging Message—SMTPAppender
- Logging Through Telnet—TelnetAppender
- Distributed Logging Examples
- Final Words
- Conclusion
- Chapter 4 Formatting Logging Information in log4j
- Chapter 5 Filtering, Error Handling, and Special Rendering of Log Messages
- Chapter 6 Extending log4j to Create Custom Logging Components
- Chapter 7 A Complete log4j Example
- Chapter 8 Log4j and J2EE
- Chapter 9 Using the Apache Log Tag Library
-
Chapter 10 Best Practices and Looking Forward to 1.3
- Obtaining a Logger
- Using Logger Hierarchy
- Logging Messages Efficiently
- Issues with Localization
- Using Location Information
- Formatting Logging Information
- Using Renderer Objects
- Using Asynchronous Logging
- Using Filter Objects
- Using Nested Diagnostic Context
- Configuration Issues
- Comparing log4j and the JDK Logging API
- Looking Forward to log4j 1.3
- Conclusion
- Appendix A The log4j Configuration Parameters
- Appendix B The log4j DTD
- Index
Product information
- Title: Pro Apache Log4j, Second Edition
- Author(s):
- Release date: June 2005
- Publisher(s): Apress
- ISBN: 9781430200345
You might also like
book
Programming GPS and OpenStreetMap Applications with Java
This book provides a concrete paradigm for object-oriented modeling and programming. It introduces the use of …
book
Developing Middleware in Java EE 8
Use Java features such as JAX-RS, EJBs, and JPAs to build powerful middleware for newer architectures …
book
What's New in Apache Web Server 2.2?
What's New in Apache Web Server 2.2? shows you all the new features you'll know to …
book
Log4J
Log4j has been around for a while now, and it seems like so many applications use …