org.clapper.util.logging

Package org.clapper.util.logging

org.clapper.util.logging - Logging Classes.

See: Description

Package org.clapper.util.logging Description

org.clapper.util.logging - Logging Classes.

This package contains logging-related classes. TheLogger class provides a front-end tothe Jakarta Commons LoggingAPI,insulating calling applications from the specifics of the underlyinglogging layer, while providing a simpler, thinner interface thanCommons Logging. Other classes, such asJavaUtilLoggingTextFormatter,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 withboth Jakarta Commons Logging and java.util.logging (whichJakarta 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 example:
    java -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger -Dlog4j.configuration=file:/path/to/log4j-debug.properties

SCaVis 2.0 © jWork.ORG