Class Summary Class Description JavaUtilLoggingTextFormatterImplements a log formatter for the java.util.logging infrastructure that formats each non-exception log record as a simple, single-line text string. LoggerLogger wraps the Jakarta Commons Logging API and provides a slightly simpler, but similar, interface.
Enum Summary Enum Description LogLevelEncodes legal logging level constants for the
Package org.clapper.util.logging Description
org.clapper.util.logging - Logging Classes.
This package contains logging-related classes. The Logger class provides a front-end to the Jakarta Commons Logging API, insulating calling applications from the specifics of the underlying logging layer, while providing a simpler, thinner interface than Commons Logging. Other classes, such as JavaUtilLoggingTextFormatter, provide useful formatters for the java.util.logging framework.
WARNING: If your application installs its own class loader (e.g., as the thread context class loader), you may have problems with both Jakarta Commons Logging and java.util.logging (which Jakarta Commons Logging uses as its default logging implementation).
- The java.util.logging layer explicitly bootstraps itself using the system class loader (i.e., the class loader that examines the CLASSPATH setting). In some cases, this can cause problems. For instance, an application that installs its own class loader and expects to use that class loader to find a custom-built java.util.logging formatter will not end up using its own formatter, because the formatter class is not available in the CLASSPATH, and that's where java.util.logging expects to find it. In situations like that, the best bet is to substitute a better-behaved underlying logging layer such as Log4J.
- Jakarta Commons Logging uses a "discovery" process that plays
class loader games. You can solve the problem with Commons Logging
by explicitly specifying the underlying logging API to use. For
java -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger -Dlog4j.configuration=file:/path/to/log4j-debug.properties
SCaVis 1.0 © jWork.org