commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/logging/src/java/org/apache/commons/logging/impl package.html Jdk14Logger.java Log4JCategoryLog.java Log4JLogger.java Log4jFactory.java LogFactoryImpl.java LogKitLogger.java NoOpLog.java SimpleLog.java
Date Sun, 30 Mar 2003 23:42:37 GMT
craigmcc    2003/03/30 15:42:36

  Modified:    logging  build.xml
               logging/src/java/org/apache/commons/logging Log.java
                        LogConfigurationException.java LogFactory.java
                        LogSource.java package.html
               logging/src/java/org/apache/commons/logging/impl
                        Jdk14Logger.java Log4JCategoryLog.java
                        Log4JLogger.java Log4jFactory.java
                        LogFactoryImpl.java LogKitLogger.java NoOpLog.java
                        SimpleLog.java
  Added:       logging/src/java overview.html
               logging/src/java/org/apache/commons/logging/impl
                        package.html
  Log:
  Cosmetic changes, and correct copyright dates.  Add simple overview
  with pointer to the real documentation, and a package.html for the
  o.a.c.l.impl package.  Bring various documentation points up to date
  with the actual current functionality.
  
  Revision  Changes    Path
  1.29      +5 -3      jakarta-commons/logging/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/build.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- build.xml	30 Mar 2003 05:22:50 -0000	1.28
  +++ build.xml	30 Mar 2003 23:42:35 -0000	1.29
  @@ -42,7 +42,7 @@
     <property name="component.package"       value="org.apache.commons.logging"/>
   
     <!-- The title of this component -->
  -  <property name="component.title"         value="Logging Library"/>
  +  <property name="component.title"         value="Logging Wrapper Library"/>
   
     <!-- The current version number of this component -->
     <property name="component.version"       value="1.0.2"/>
  @@ -62,6 +62,7 @@
     <!-- The base directory for unit test sources -->
     <property name="test.home"               value="src/test"/>
   
  +
   <!-- ========== Compiler Defaults ========================================= -->
   
   
  @@ -266,13 +267,14 @@
       <mkdir      dir="${dist.home}/docs/api"/>
       <javadoc sourcepath="${source.home}"
                   destdir="${dist.home}/docs/api"
  +               overview="${source.home}/overview.html"
              packagenames="org.apache.commons.*"
                    author="true"
                   private="true"
                   version="true"
                  doctitle="&lt;h1&gt;${component.title} (Version ${component.version})&lt;/h1&gt;"
               windowtitle="${component.title} (Version ${component.version})"
  -                 bottom="Copyright (c) 2002 - Apache Software Foundation">
  +                 bottom="Copyright (c) 2002-2003 - Apache Software Foundation">
         <classpath refid="test.classpath"/>
       </javadoc>
     </target>
  
  
  
  1.1                  jakarta-commons/logging/src/java/overview.html
  
  Index: overview.html
  ===================================================================
  <html>
  <head>
  <title>Overview Documentation for COMMONS-LOGGING</title>
  </head>
  <body bgcolor="white">
  <p>The <em>Logging Wrapper Library</em> component of the Jakarta Commons
  subproject offers wrappers around an extensible set of concrete logging
  implementations, so that application code based on it does not need to be
  modified in order to select a different logging implementation.</p>
  
  <p>See the
  <a href="org/apache/commons/logging/package-summary.html#package_description">
  Package Description</a> for the <code>org.apache.commons.logging</code>
  package for more information.</p>
  </body>
  </html>
  
  
  
  1.14      +6 -6      jakarta-commons/logging/src/java/org/apache/commons/logging/Log.java
  
  Index: Log.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/Log.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Log.java	15 Jun 2002 18:13:01 -0000	1.13
  +++ Log.java	30 Mar 2003 23:42:36 -0000	1.14
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -64,7 +64,7 @@
   
   /**
    * <p>A simple logging interface abstracting logging APIs.  In order to be
  - * instantiated successfully by {@link LogSource}, classes that implement
  + * instantiated successfully by {@link LogFactory}, classes that implement
    * this interface must have a constructor that takes a single String
    * parameter representing the "name" of this Log.</p>
    *
  
  
  
  1.2       +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/LogConfigurationException.java
  
  Index: LogConfigurationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/LogConfigurationException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LogConfigurationException.java	13 Feb 2002 02:18:30 -0000	1.1
  +++ LogConfigurationException.java	30 Mar 2003 23:42:36 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.21      +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/LogFactory.java
  
  Index: LogFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/LogFactory.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- LogFactory.java	1 Mar 2003 09:55:06 -0000	1.20
  +++ LogFactory.java	30 Mar 2003 23:42:36 -0000	1.21
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.17      +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/LogSource.java
  
  Index: LogSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/LogSource.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- LogSource.java	23 Nov 2002 03:49:40 -0000	1.16
  +++ LogSource.java	30 Mar 2003 23:42:36 -0000	1.17
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.9       +32 -29    jakarta-commons/logging/src/java/org/apache/commons/logging/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/package.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- package.html	23 Nov 2002 03:49:40 -0000	1.8
  +++ package.html	30 Mar 2003 23:42:36 -0000	1.9
  @@ -1,6 +1,7 @@
   <body>
   <p>Simple wrapper API around multiple logging APIs.</p>
   
  +
   <h3>Overview</h3>
   
   <p>This package provides an API for logging in server-based applications that
  @@ -14,14 +15,14 @@
       JDK Logging API</a>, included in JDK 1.4 or later systems.  Each named
       <a href="Log.html">Log</a> instance is connected to a corresponding
       <code>java.util.logging.Logger</code> instance.</li>
  -<li><a href="http://jakarta.apache.org/avalon/">LogKit</a> from Apache's
  -    Jakarta project.  Each named <a href="Log.html">Log</a> instance is
  +<li><a href="http://avalong.apache.org/logkit/">LogKit</a> from Apache's
  +    Avalon project.  Each named <a href="Log.html">Log</a> instance is
       connected to a corresponding LogKit <code>Logger</code>.</li>
   <li><a href="impl/NoOpLog.html">NoOpLog</a> implementation that simply
swallows
       all log output, for all named <a href="Log.html">Log</a> isntances.</li>
   <li><a href="impl/SimpleLog.html">SimpleLog</a> implementation that writes
all
       log output, for all named <a href="Log.html">Log</a> instances, to
  -    System.out.</li>
  +    System.err.</li>
   </ul>
   
   
  @@ -37,7 +38,7 @@
   
       public class Foo {
   
  -        Log log = LogFactory.getLog(this.class);
  +        static Log log = LogFactory.getLog(this.class);
   
           public void foo() {
               ...
  @@ -53,9 +54,10 @@
           }
   </pre>
   
  -<p>Unless you configure things differently, all log output will be thrown
  -away.  Therefore, you really will want to review the remainder of this page
  -in order to understand how to configure logging for your application.</p>
  +<p>Unless you configure things differently, all log output will be written
  +to System.err.  Therefore, you really will want to review the remainder of
  +this page in order to understand how to configure logging for your
  +application.</p>
   
   
   <h3>Configuring the Commons Logging Package</h3>
  @@ -65,11 +67,11 @@
   
   <p>From an application perspective, the first requirement is to retrieve an
   object reference to the <code>LogFactory</code> instance that will be used
  -to create <code><a href="Log.html">Log</a></code> instances for
this application.
  -This is normally accomplished by calling the static <code>getFactory()</code>
  -method.  This method implements the following discovery algorithm to select
  -the name of the <code>LogFactory</code> implementation class this application
  -wants to use:</p>
  +to create <code><a href="Log.html">Log</a></code> instances for
this
  +application.  This is normally accomplished by calling the static
  +<code>getFactory()</code> method.  This method implements the following
  +discovery algorithm to select the name of the <code>LogFactory</code>
  +implementation class this application wants to use:</p>
   <ul>
   <li>Check for a system property named
      <code>org.apache.commons.logging.LogFactory</code>.</li>
  @@ -98,7 +100,7 @@
   shared in a multiple class loader environment (such as a servlet container),
   but still allow each web application to provide its own <code>LogFactory</code>
   implementation, if it so desires.  An instance of this class will then be
  -created, and
  +created, and cached per class loader.
   
   
   <h4>The Default <code>LogFactory</code> Implementation</h4>
  @@ -119,12 +121,14 @@
       <code>LogFactory</code> implementation uses the following discovery
       process is used:
       <ul>
  +    <li>Look for a configuration attribute of this factory named
  +        <code>org.apache.commons.logging.Log</code> (for backwards
  +        compatibility to pre-1.0 versions of this API, an attribute
  +        <code>org.apache.commons.logging.log is also consulted)..</li>
       <li>Look for a system property named
           <code>org.apache.commons.logging.Log</code> (for backwards
           compatibility to pre-1.0 versions of this API, a system property
           <code>org.apache.commons.logging.log</code> is also consulted).</li>
  -    <li>Look for a configuration attribute of this factory named
  -        <code>org.apache.commons.logging.Log</code>.</li>
       <li>If the Log4J logging system is available in the application
           class path, use the corresponding wrapper class
           (<a href="impl/Log4JLogger.html">Log4JLogger</a>).</li>
  @@ -142,20 +146,8 @@
       argument to its constructor.</li>
   </ul>
   
  -<p>If you wish to receive logging output to <code>System.out</code>,
but have
  -not installed one of the three supported logging packages, a simple
  -<code>Log</code> implementation named <a href="impl/SimpleLog.html">
  -SimpleLog</a> is available.  You can select it, based on the above rules,
  -by including a system property definition on the command line that starts
  -your application:</p>
  -<pre>
  -    java \
  -      -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog \
  -      MyApplication
  -</pre>
  -
   <p>See the <a href="impl/SimpleLog.html">SimpleLog</a> JavaDocs for detailed
  -configuration information for this implementation.</p>
  +configuration information for this default implementation.</p>
   
   
   <h4>Configuring the Underlying Logging System</h4>
  @@ -192,6 +184,16 @@
       <code>warn()</code>, <code>error</code>, and <code>fatal()</code>).</li>
   </ol>
   
  +<p>For convenience, <code>LogFactory</code> also offers a static method
  +<code>getLog()</code> that combines the typical two-step pattern:</p>
  +<pre>
  +  Log log = LogFactory.getFactory().getInstance("Foo");
  +</pre>
  +<p>into a single method call:</p>
  +<pre>
  +  Log log = LogFactory.getLog("Foo");
  +</pre>
  +
   <p>For example, you might use the following technique to initialize and
   use a <a href="Log.html">Log</a> instance in an application component:</p>
   <pre>
  @@ -200,7 +202,8 @@
   
   public class MyComponent {
   
  -  protected Log log = LogFactory.getLog("my.component");
  +  protected static Log log =
  +    LogFactory.getLog("my.component");
   
     // Called once at startup time
     public void start() {
  
  
  
  1.5       +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Jdk14Logger.java
  
  Index: Jdk14Logger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Jdk14Logger.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Jdk14Logger.java	17 Jul 2002 16:42:40 -0000	1.4
  +++ Jdk14Logger.java	30 Mar 2003 23:42:36 -0000	1.5
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.9       +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java
  
  Index: Log4JCategoryLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Log4JCategoryLog.java	23 Nov 2002 03:49:40 -0000	1.8
  +++ Log4JCategoryLog.java	30 Mar 2003 23:42:36 -0000	1.9
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.2       +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4JLogger.java
  
  Index: Log4JLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4JLogger.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Log4JLogger.java	23 Nov 2002 03:50:13 -0000	1.1
  +++ Log4JLogger.java	30 Mar 2003 23:42:36 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.3       +1 -1      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4jFactory.java
  
  Index: Log4jFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/Log4jFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Log4jFactory.java	23 Nov 2002 03:49:40 -0000	1.2
  +++ Log4jFactory.java	30 Mar 2003 23:42:36 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.24      +5 -5      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
  
  Index: LogFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- LogFactoryImpl.java	29 Mar 2003 18:31:17 -0000	1.23
  +++ LogFactoryImpl.java	30 Mar 2003 23:42:36 -0000	1.24
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.3       +8 -7      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogKitLogger.java
  
  Index: LogKitLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/LogKitLogger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LogKitLogger.java	17 Jul 2002 16:42:40 -0000	1.2
  +++ LogKitLogger.java	30 Mar 2003 23:42:36 -0000	1.3
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -68,8 +68,9 @@
   
   /**
    * <p>Implementation of <code>org.apache.commons.logging.Log</code>
  - * that wraps the <a href="http://jakarta.apache.org/avalon/logkit/">jakarta-avalon-logkit</a>
  - * logging system. Configuration of <code>LogKit</code> is left to the user.</p>
  + * that wraps the <a href="http://avalon.apache.org/logkit/">avalon-logkit</a>
  + * logging system. Configuration of <code>LogKit</code> is left to the user.
  + * </p>
    *
    * <p><code>LogKit</code> accepts only <code>String</code>
messages.
    * Therefore, this implementation converts object messages into strings
  
  
  
  1.2       +6 -6      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/NoOpLog.java
  
  Index: NoOpLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/NoOpLog.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NoOpLog.java	3 Feb 2002 01:31:29 -0000	1.1
  +++ NoOpLog.java	30 Mar 2003 23:42:36 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -67,7 +67,7 @@
   
   
   /**
  - * <p>Default implementation of Log that throws away all messages.  No
  + * <p>Trivial implementation of Log that throws away all messages.  No
    * configurable system properties are supported.</p>
    *
    * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
  
  
  
  1.9       +7 -7      jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java
  
  Index: SimpleLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SimpleLog.java	12 Dec 2002 20:29:16 -0000	1.8
  +++ SimpleLog.java	30 Mar 2003 23:42:36 -0000	1.9
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -90,10 +90,10 @@
    *     If not specified, the default logging detail level is used.</li>
    * <li><code>org.apache.commons.logging.simplelog.showlogname</code>
-
    *     Set to <code>true</code> if you want the Log instance name to be
  - *     included in output messages. Defaults to false</li>
  + *     included in output messages. Defaults to <code>false</code>.</li>
    * <li><code>org.apache.commons.logging.simplelog.showShortLogname</code>
-
    *     Set to <code>true</code> if you want the last componet of the name to
be
  - *     included in output messages. Defaults to true.</li>
  + *     included in output messages. Defaults to <code>true</code>.</li>
    * <li><code>org.apache.commons.logging.simplelog.showdatetime</code>
-
    *     Set to <code>true</code> if you want the current date and time
    *     to be included in output messages. Default is false.</li>
  
  
  
  1.1                  jakarta-commons/logging/src/java/org/apache/commons/logging/impl/package.html
  
  Index: package.html
  ===================================================================
  <body>
  <p>Concrete implementations of commons-logging wrapper APIs.</p>
  </body>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message