diff --git a/src/java/org/apache/commons/logging/package.html b/src/java/org/apache/commons/logging/package.html index 003b0b8..59d218d 100644 --- a/src/java/org/apache/commons/logging/package.html +++ b/src/java/org/apache/commons/logging/package.html @@ -124,7 +124,7 @@ implementation uses the following rules:

  • Look for a configuration attribute of this factory named org.apache.commons.logging.Log (for backwards compatibility to pre-1.0 versions of this API, an attribute - org.apache.commons.logging.log is also consulted)..
  • + org.apache.commons.logging.log is also consulted).
  • Look for a system property named org.apache.commons.logging.Log (for backwards compatibility to pre-1.0 versions of this API, a system property diff --git a/usersguide.html b/usersguide.html index 3808323..346490d 100644 --- a/usersguide.html +++ b/usersguide.html @@ -23,6 +23,7 @@ Users Guide : Jakarta Commons Logging

    Table of Contents

    Introduction +
    Users Quick Start
    Developers
      Best Practices
    Integration @@ -53,6 +54,51 @@ and The interface maps closely to Log4J and LogKit.

    +

    Users Quick Start

    +

    +As far as possible, Commons-Logging tries to be as unobtrusive as possible. +In most cases, including the (full) commons-logging.jar in the classpath +should result in Commons-Logging configuring itself in a reasonable manner. +There's a good chance that it'll guess your preferred logging system and you won't +need to do any configuration at all! +

    +

    Configuration

    +

    +There are two base abstractions used by Commons-Logging: Log +(the basic logger) and LogFactory (which knows how to create Log +instances). Using LogFactory implementations other than the default is a +subject for advanced users only, so let's concentrate on configuring the default +implementation. +

    +

    +The default LogFactory implementation uses the following discovery process +to determine what type of Log implementation it should use +(the process terminates when the first positive match - in order - is found): + +

      +
    1. Look for a configuration attribute of this factory named + org.apache.commons.logging.Log (for backwards + compatibility to pre-1.0 versions of this API, an attribute + org.apache.commons.logging.log is also consulted).
    2. +
    3. Look for a system property named + org.apache.commons.logging.Log (for backwards + compatibility to pre-1.0 versions of this API, a system property + org.apache.commons.logging.log is also consulted).
    4. +
    5. If the Log4J logging system is available in the application + class path, use the corresponding wrapper class + (Log4JLogger).
    6. +
    7. If the application is executing on a JDK 1.4 system, use + the corresponding wrapper class + (Jdk14Logger).
    8. +
    9. Fall back to the default simple logging wrapper + (SimpleLog).
    10. +
    + +Consult the Commons-Logging javadocs for details of the various Log +implementations that ship with the component. (The discovery process is also covered in more +detail there.) +

    +

    Developers