From aff740f629015f31910307fce730221864a086e7 Mon Sep 17 00:00:00 2001
From: Robert Burrell Donkin Implementation of commons-logging Log interface that delegates all
* logging calls to the Avalon logging abstraction: the Logger interface.
+ *
+ * There are two ways in which this class can be used:
+ *
+ *
*
* @author Neeme Praks
- * @version $Revision: 1.8 $ $Date: 2004/02/28 21:46:45 $
+ * @version $Revision: 1.9 $ $Date: 2004/06/01 19:56:20 $
*/
public class AvalonLogger implements Log, Serializable {
+ /** Ancesteral avalon logger */
private static Logger defaultLogger = null;
+ /** Avalon logger used to perform log */
private transient Logger logger = null;
+ /** The name of this logger */
private String name = null;
/**
+ * Constructs an AvalonLogger
+ * instances created through the LogFactory mechanisms will output
+ * to child loggers of this Logger.
+ * AvalonLogger that outputs to the given
+ * Logger instance.
* @param logger the avalon logger implementation to delegate to
*/
public AvalonLogger(Logger logger) {
@@ -42,6 +63,8 @@ public class AvalonLogger implements Log, Serializable {
}
/**
+ * Constructs an AvalonLogger that will log to a child
+ * of the Logger set by calling {@link #setDefaultLogger}.
* @param name the name of the avalon logger implementation to delegate to
*/
public AvalonLogger(String name) {
@@ -51,6 +74,7 @@ public class AvalonLogger implements Log, Serializable {
}
/**
+ * Gets the Avalon logger implementation used to perform logging.
* @return avalon logger implementation
*/
public Logger getLogger() {
@@ -61,7 +85,10 @@ public class AvalonLogger implements Log, Serializable {
}
/**
- * @param logger the default avalon logger, in case there is no logger instance supplied in constructor
+ * Sets the ancesteral Avalon logger from which the delegating loggers
+ * will descend.
+ * @param logger the default avalon logger,
+ * in case there is no logger instance supplied in constructor
*/
public static void setDefaultLogger(Logger logger) {
defaultLogger = logger;
diff --git a/src/java/org/apache/commons/logging/impl/LogKitLogger.java b/src/java/org/apache/commons/logging/impl/LogKitLogger.java
index 5e694a1..c904ed1 100644
--- a/src/java/org/apache/commons/logging/impl/LogKitLogger.java
+++ b/src/java/org/apache/commons/logging/impl/LogKitLogger.java
@@ -33,8 +33,8 @@ import org.apache.commons.logging.Log;
* by called their toString() method before logging them.