From 27559f2f8cb78c3c89c9ddbc11f074c0b25a3189 Mon Sep 17 00:00:00 2001
From: "Craig R. McClanahan"
Date: Sun, 30 Mar 2003 23:42:36 +0000
Subject: [PATCH] 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.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138961 13f79535-47bb-0310-9956-ffa450edef68
---
build.xml | 8 ++-
src/java/org/apache/commons/logging/Log.java | 12 ++--
.../logging/LogConfigurationException.java | 10 +--
.../apache/commons/logging/LogFactory.java | 10 +--
.../org/apache/commons/logging/LogSource.java | 10 +--
.../commons/logging/impl/Jdk14Logger.java | 10 +--
.../logging/impl/Log4JCategoryLog.java | 10 +--
.../commons/logging/impl/Log4JLogger.java | 10 +--
.../commons/logging/impl/Log4jFactory.java | 2 +-
.../commons/logging/impl/LogFactoryImpl.java | 10 +--
.../commons/logging/impl/LogKitLogger.java | 15 ++---
.../apache/commons/logging/impl/NoOpLog.java | 12 ++--
.../commons/logging/impl/SimpleLog.java | 14 ++---
.../apache/commons/logging/impl/package.html | 3 +
.../org/apache/commons/logging/package.html | 61 ++++++++++---------
src/java/overview.html | 16 +++++
16 files changed, 119 insertions(+), 94 deletions(-)
create mode 100644 src/java/org/apache/commons/logging/impl/package.html
create mode 100644 src/java/overview.html
diff --git a/build.xml b/build.xml
index fb2a6cf..b296709 100644
--- a/build.xml
+++ b/build.xml
@@ -3,7 +3,7 @@
@@ -42,7 +42,7 @@
-
+
@@ -62,6 +62,7 @@
+
@@ -266,13 +267,14 @@
+ bottom="Copyright (c) 2002-2003 - Apache Software Foundation">
diff --git a/src/java/org/apache/commons/logging/Log.java b/src/java/org/apache/commons/logging/Log.java
index 989a15b..87bf46f 100644
--- a/src/java/org/apache/commons/logging/Log.java
+++ b/src/java/org/apache/commons/logging/Log.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/Log.java,v 1.13 2002/06/15 18:13:01 craigmcc Exp $
- * $Revision: 1.13 $
- * $Date: 2002/06/15 18:13:01 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/Log.java,v 1.14 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.14 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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 @@ package org.apache.commons.logging;
/**
* 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.
*
@@ -102,7 +102,7 @@ package org.apache.commons.logging;
*
* @author Scott Sanders
* @author Rod Waldhoff
- * @version $Id: Log.java,v 1.13 2002/06/15 18:13:01 craigmcc Exp $
+ * @version $Id: Log.java,v 1.14 2003/03/30 23:42:36 craigmcc Exp $
*/
public interface Log {
diff --git a/src/java/org/apache/commons/logging/LogConfigurationException.java b/src/java/org/apache/commons/logging/LogConfigurationException.java
index d862887..3699ba0 100644
--- a/src/java/org/apache/commons/logging/LogConfigurationException.java
+++ b/src/java/org/apache/commons/logging/LogConfigurationException.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/LogConfigurationException.java,v 1.1 2002/02/13 02:18:30 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2002/02/13 02:18:30 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/LogConfigurationException.java,v 1.2 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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,7 +68,7 @@ package org.apache.commons.logging;
* factory methods.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2002/02/13 02:18:30 $
+ * @version $Revision: 1.2 $ $Date: 2003/03/30 23:42:36 $
*/
public class LogConfigurationException extends RuntimeException {
diff --git a/src/java/org/apache/commons/logging/LogFactory.java b/src/java/org/apache/commons/logging/LogFactory.java
index 7c4f928..d021bab 100644
--- a/src/java/org/apache/commons/logging/LogFactory.java
+++ b/src/java/org/apache/commons/logging/LogFactory.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/LogFactory.java,v 1.20 2003/03/01 09:55:06 baliuka Exp $
- * $Revision: 1.20 $
- * $Date: 2003/03/01 09:55:06 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/LogFactory.java,v 1.21 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.21 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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
@@ -87,7 +87,7 @@ import java.util.Properties;
* @author Craig R. McClanahan
* @author Costin Manolache
* @author Richard A. Sitze
- * @version $Revision: 1.20 $ $Date: 2003/03/01 09:55:06 $
+ * @version $Revision: 1.21 $ $Date: 2003/03/30 23:42:36 $
*/
public abstract class LogFactory {
diff --git a/src/java/org/apache/commons/logging/LogSource.java b/src/java/org/apache/commons/logging/LogSource.java
index 458a34b..0164357 100644
--- a/src/java/org/apache/commons/logging/LogSource.java
+++ b/src/java/org/apache/commons/logging/LogSource.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/LogSource.java,v 1.16 2002/11/23 03:49:40 craigmcc Exp $
- * $Revision: 1.16 $
- * $Date: 2002/11/23 03:49:40 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/LogSource.java,v 1.17 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.17 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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
@@ -97,7 +97,7 @@ import org.apache.commons.logging.impl.NoOpLog;
* implementation performs exactly the same algorithm as this class did
*
* @author Rod Waldhoff
- * @version $Id: LogSource.java,v 1.16 2002/11/23 03:49:40 craigmcc Exp $
+ * @version $Id: LogSource.java,v 1.17 2003/03/30 23:42:36 craigmcc Exp $
*/
public class LogSource {
diff --git a/src/java/org/apache/commons/logging/impl/Jdk14Logger.java b/src/java/org/apache/commons/logging/impl/Jdk14Logger.java
index 1b83598..62db769 100644
--- a/src/java/org/apache/commons/logging/impl/Jdk14Logger.java
+++ b/src/java/org/apache/commons/logging/impl/Jdk14Logger.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Jdk14Logger.java,v 1.4 2002/07/17 16:42:40 rsitze Exp $
- * $Revision: 1.4 $
- * $Date: 2002/07/17 16:42:40 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Jdk14Logger.java,v 1.5 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.5 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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
@@ -77,7 +77,7 @@ import org.apache.commons.logging.Log;
* @author Scott Sanders
* @author Berin Loritsch
* @author Peter Donald
- * @version $Revision: 1.4 $ $Date: 2002/07/17 16:42:40 $
+ * @version $Revision: 1.5 $ $Date: 2003/03/30 23:42:36 $
*/
public final class Jdk14Logger implements Log {
diff --git a/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java b/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java
index bf91e8e..b26a5e5 100644
--- a/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java
+++ b/src/java/org/apache/commons/logging/impl/Log4JCategoryLog.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Attic/Log4JCategoryLog.java,v 1.8 2002/11/23 03:49:40 craigmcc Exp $
- * $Revision: 1.8 $
- * $Date: 2002/11/23 03:49:40 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Attic/Log4JCategoryLog.java,v 1.9 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.9 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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
@@ -77,7 +77,7 @@ import java.util.Enumeration;
* @author Scott Sanders
* @author Rod Waldhoff
* @author Robert Burrell Donkin
- * @version $Id: Log4JCategoryLog.java,v 1.8 2002/11/23 03:49:40 craigmcc Exp $
+ * @version $Id: Log4JCategoryLog.java,v 1.9 2003/03/30 23:42:36 craigmcc Exp $
*/
public final class Log4JCategoryLog implements Log {
diff --git a/src/java/org/apache/commons/logging/impl/Log4JLogger.java b/src/java/org/apache/commons/logging/impl/Log4JLogger.java
index 8119266..fdf9313 100644
--- a/src/java/org/apache/commons/logging/impl/Log4JLogger.java
+++ b/src/java/org/apache/commons/logging/impl/Log4JLogger.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Log4JLogger.java,v 1.1 2002/11/23 03:50:13 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2002/11/23 03:50:13 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/Log4JLogger.java,v 1.2 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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
@@ -75,7 +75,7 @@ import java.util.Enumeration;
* @author Scott Sanders
* @author Rod Waldhoff
* @author Robert Burrell Donkin
- * @version $Id: Log4JLogger.java,v 1.1 2002/11/23 03:50:13 craigmcc Exp $
+ * @version $Id: Log4JLogger.java,v 1.2 2003/03/30 23:42:36 craigmcc Exp $
*/
public final class Log4JLogger implements Log {
diff --git a/src/java/org/apache/commons/logging/impl/Log4jFactory.java b/src/java/org/apache/commons/logging/impl/Log4jFactory.java
index 08c94b9..740a94c 100644
--- a/src/java/org/apache/commons/logging/impl/Log4jFactory.java
+++ b/src/java/org/apache/commons/logging/impl/Log4jFactory.java
@@ -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
diff --git a/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java b/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
index f0c7b88..4d49efb 100644
--- a/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
+++ b/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v 1.23 2003/03/29 18:31:17 craigmcc Exp $
- * $Revision: 1.23 $
- * $Date: 2003/03/29 18:31:17 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java,v 1.24 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.24 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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
@@ -107,7 +107,7 @@ import org.apache.commons.logging.LogFactory;
* @author Rod Waldhoff
* @author Craig R. McClanahan
* @author Richard A. Sitze
- * @version $Revision: 1.23 $ $Date: 2003/03/29 18:31:17 $
+ * @version $Revision: 1.24 $ $Date: 2003/03/30 23:42:36 $
*/
public class LogFactoryImpl extends LogFactory {
diff --git a/src/java/org/apache/commons/logging/impl/LogKitLogger.java b/src/java/org/apache/commons/logging/impl/LogKitLogger.java
index fb978bd..7f0945d 100644
--- a/src/java/org/apache/commons/logging/impl/LogKitLogger.java
+++ b/src/java/org/apache/commons/logging/impl/LogKitLogger.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogKitLogger.java,v 1.2 2002/07/17 16:42:40 rsitze Exp $
- * $Revision: 1.2 $
- * $Date: 2002/07/17 16:42:40 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/LogKitLogger.java,v 1.3 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.3 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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 @@ import org.apache.commons.logging.Log;
/**
* Implementation of org.apache.commons.logging.Log
- * that wraps the jakarta-avalon-logkit
- * logging system. Configuration of LogKit is left to the user.
+ * that wraps the avalon-logkit
+ * logging system. Configuration of LogKit is left to the user.
+ *
*
* LogKit accepts only String messages.
* Therefore, this implementation converts object messages into strings
@@ -77,7 +78,7 @@ import org.apache.commons.logging.Log;
*
* @author Scott Sanders
* @author Robert Burrell Donkin *
- * @version $Id: LogKitLogger.java,v 1.2 2002/07/17 16:42:40 rsitze Exp $
+ * @version $Id: LogKitLogger.java,v 1.3 2003/03/30 23:42:36 craigmcc Exp $
*/
public final class LogKitLogger implements Log {
diff --git a/src/java/org/apache/commons/logging/impl/NoOpLog.java b/src/java/org/apache/commons/logging/impl/NoOpLog.java
index ac7aaa8..b6c6af4 100644
--- a/src/java/org/apache/commons/logging/impl/NoOpLog.java
+++ b/src/java/org/apache/commons/logging/impl/NoOpLog.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/NoOpLog.java,v 1.1 2002/02/03 01:31:29 sanders Exp $
- * $Revision: 1.1 $
- * $Date: 2002/02/03 01:31:29 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/NoOpLog.java,v 1.2 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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,12 +67,12 @@ import org.apache.commons.logging.Log;
/**
- *
Default implementation of Log that throws away all messages. No
+ *
Trivial implementation of Log that throws away all messages. No
* configurable system properties are supported.
*
* @author Scott Sanders
* @author Rod Waldhoff
- * @version $Id: NoOpLog.java,v 1.1 2002/02/03 01:31:29 sanders Exp $
+ * @version $Id: NoOpLog.java,v 1.2 2003/03/30 23:42:36 craigmcc Exp $
*/
public final class NoOpLog implements Log {
diff --git a/src/java/org/apache/commons/logging/impl/SimpleLog.java b/src/java/org/apache/commons/logging/impl/SimpleLog.java
index 80f0344..e1e7d5d 100644
--- a/src/java/org/apache/commons/logging/impl/SimpleLog.java
+++ b/src/java/org/apache/commons/logging/impl/SimpleLog.java
@@ -1,13 +1,13 @@
/*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/SimpleLog.java,v 1.8 2002/12/12 20:29:16 rsitze Exp $
- * $Revision: 1.8 $
- * $Date: 2002/12/12 20:29:16 $
+ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//logging/src/java/org/apache/commons/logging/impl/SimpleLog.java,v 1.9 2003/03/30 23:42:36 craigmcc Exp $
+ * $Revision: 1.9 $
+ * $Date: 2003/03/30 23:42:36 $
*
* ====================================================================
*
* 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 @@ import org.apache.commons.logging.LogConfigurationException;
* If not specified, the default logging detail level is used.
* org.apache.commons.logging.simplelog.showlogname -
* Set to true if you want the Log instance name to be
- * included in output messages. Defaults to false
+ * included in output messages. Defaults to false.
* org.apache.commons.logging.simplelog.showShortLogname -
* Set to true if you want the last componet of the name to be
- * included in output messages. Defaults to true.
+ * included in output messages. Defaults to true.
* org.apache.commons.logging.simplelog.showdatetime -
* Set to true if you want the current date and time
* to be included in output messages. Default is false.
@@ -108,7 +108,7 @@ import org.apache.commons.logging.LogConfigurationException;
* @author Rod Waldhoff
* @author Robert Burrell Donkin
*
- * @version $Id: SimpleLog.java,v 1.8 2002/12/12 20:29:16 rsitze Exp $
+ * @version $Id: SimpleLog.java,v 1.9 2003/03/30 23:42:36 craigmcc Exp $
*/
public class SimpleLog implements Log {
diff --git a/src/java/org/apache/commons/logging/impl/package.html b/src/java/org/apache/commons/logging/impl/package.html
new file mode 100644
index 0000000..e237393
--- /dev/null
+++ b/src/java/org/apache/commons/logging/impl/package.html
@@ -0,0 +1,3 @@
+
+Concrete implementations of commons-logging wrapper APIs.
+
diff --git a/src/java/org/apache/commons/logging/package.html b/src/java/org/apache/commons/logging/package.html
index c85a1bd..003b0b8 100644
--- a/src/java/org/apache/commons/logging/package.html
+++ b/src/java/org/apache/commons/logging/package.html
@@ -1,6 +1,7 @@
Simple wrapper API around multiple logging APIs.
+
Overview
This package provides an API for logging in server-based applications that
@@ -14,14 +15,14 @@ prebuilt support for the following:
JDK Logging API, included in JDK 1.4 or later systems. Each named
Log instance is connected to a corresponding
java.util.logging.Logger instance.
-LogKit from Apache's
- Jakarta project. Each named Log instance is
+LogKit from Apache's
+ Avalon project. Each named Log instance is
connected to a corresponding LogKit Logger.
NoOpLog implementation that simply swallows
all log output, for all named Log isntances.
SimpleLog implementation that writes all
log output, for all named Log instances, to
- System.out.
+ System.err.
@@ -37,7 +38,7 @@ convention) after the calling class:
public class Foo {
- Log log = LogFactory.getLog(this.class);
+ static Log log = LogFactory.getLog(this.class);
public void foo() {
...
@@ -53,9 +54,10 @@ convention) after the calling class:
}
-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.
+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.
Configuring the Commons Logging Package
@@ -65,11 +67,11 @@ in order to understand how to configure logging for your application.
From an application perspective, the first requirement is to retrieve an
object reference to the LogFactory instance that will be used
-to create Log instances for this application.
-This is normally accomplished by calling the static getFactory()
-method. This method implements the following discovery algorithm to select
-the name of the LogFactory implementation class this application
-wants to use:
+to create Log instances for this
+application. This is normally accomplished by calling the static
+getFactory() method. This method implements the following
+discovery algorithm to select the name of the LogFactory
+implementation class this application wants to use:
- Check for a system property named
org.apache.commons.logging.LogFactory.
@@ -98,7 +100,7 @@ otherwise. This allows a copy of commons-logging.jar to be
shared in a multiple class loader environment (such as a servlet container),
but still allow each web application to provide its own LogFactory
implementation, if it so desires. An instance of this class will then be
-created, and
+created, and cached per class loader.
The Default LogFactory Implementation
@@ -119,12 +121,14 @@ implementation uses the following rules:
LogFactory implementation uses the following discovery
process is used:
+ - 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)..
- 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).
- - Look for a configuration attribute of this factory named
-
org.apache.commons.logging.Log.
- If the Log4J logging system is available in the application
class path, use the corresponding wrapper class
(Log4JLogger).
@@ -142,20 +146,8 @@ implementation uses the following rules:
argument to its constructor.
-If you wish to receive logging output to System.out, but have
-not installed one of the three supported logging packages, a simple
-Log implementation named
-SimpleLog 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:
-
- java \
- -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog \
- MyApplication
-
-
See the SimpleLog JavaDocs for detailed
-configuration information for this implementation.
+configuration information for this default implementation.
Configuring the Underlying Logging System
@@ -192,6 +184,16 @@ component, consists of the following steps:
warn(), error, and fatal()).
+For convenience, LogFactory also offers a static method
+getLog() that combines the typical two-step pattern:
+
+ Log log = LogFactory.getFactory().getInstance("Foo");
+
+into a single method call:
+
+ Log log = LogFactory.getLog("Foo");
+
+
For example, you might use the following technique to initialize and
use a Log instance in an application component:
@@ -200,7 +202,8 @@ import org.apache.commons.logging.LogFactory;
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() {
diff --git a/src/java/overview.html b/src/java/overview.html
new file mode 100644
index 0000000..737d9c2
--- /dev/null
+++ b/src/java/overview.html
@@ -0,0 +1,16 @@
+
+
+Overview Documentation for COMMONS-LOGGING
+
+
+The Logging Wrapper Library 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.
+
+See the
+
+Package Description for the org.apache.commons.logging
+package for more information.
+
+