Introduction ot Java Logging Frameworks
Logging is a common issue for most development teams. There have been several frameworks developed to ease and standardize the process of logging for the Java platform. This page covers general purpose logging frameworks. There are other logging frameworks, toolkits and libraries like Tracing Class Loader but that is for another topic.
Functionality Overview
Logger
Most frameworks support a the notion of a Logger. A Logger is an object that allows the application to log data without regard to where the data is actually logged. The application logs a message in the form of an object or and object and and exception. The message is logged at a certain level. The common levels are:
FATAL | An error that the application cannot recover from |
ERROR | An error has occured, though not a fatal error |
WARNING | what is a warning |
INFO | What is info |
DEBUG | Development debug message |
TRACE | Ttace the proggram flow. |
The logging framework maintains the current logging level for each logger. The logging level can be set more or less restrictive. For example, if the logging level is set to "WARNING", then all messages of that level or higher are logged, ERROR and FATAL.
Best Practices
Summary
Links to Java Logging Projects
See also Open Source Logging Tools in Java