Javadoc
This commit is contained in:
@@ -23,7 +23,7 @@ import org.apache.avalon.framework.logger.Logger;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of commons-logging Log interface that delegates all
|
* Implements Commons Logging's Log interface to delegate all
|
||||||
* logging calls to the Avalon logging abstraction: the Logger interface.
|
* logging calls to the Avalon logging abstraction: the Logger interface.
|
||||||
* <p>
|
* <p>
|
||||||
* There are two ways in which this class can be used:
|
* There are two ways in which this class can be used:
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ import java.util.logging.Logger;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the {@code org.apache.commons.logging.Log}
|
* Implements the {@code org.apache.commons.logging.Log}
|
||||||
* interface that wraps the standard JDK logging mechanisms that are
|
* interface tp wrap the standard JDK logging mechanisms that are
|
||||||
* available in SourceForge's Lumberjack for JDKs prior to 1.4.
|
* available in SourceForge's Lumberjack for JDKs prior to 1.4.
|
||||||
*
|
*
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import java.util.logging.Logger;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the {@code org.apache.commons.logging.Log}
|
* Implements the {@code org.apache.commons.logging.Log}
|
||||||
* interface that wraps the standard JDK logging mechanisms that were
|
* interface to wrap the standard JDK logging mechanisms that were
|
||||||
* introduced in the Merlin release (JDK 1.4).
|
* introduced in the Merlin release (JDK 1.4).
|
||||||
*/
|
*/
|
||||||
public class Jdk14Logger implements Log, Serializable {
|
public class Jdk14Logger implements Log, Serializable {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import org.apache.log4j.Logger;
|
|||||||
import org.apache.log4j.Priority;
|
import org.apache.log4j.Priority;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of {@link Log} that maps directly to a
|
* Implements {@link Log} to map directly to a
|
||||||
* <strong>Logger</strong> for log4J version 1.2.
|
* <strong>Logger</strong> for Apache Log4J version 1.2.
|
||||||
* <p>
|
* <p>
|
||||||
* Initial configuration of the corresponding Logger instances should be done
|
* Initial configuration of the corresponding Logger instances should be done
|
||||||
* in the usual manner, as outlined in the Log4J documentation.
|
* in the usual manner, as outlined in the Log4J documentation.
|
||||||
|
|||||||
@@ -24,13 +24,14 @@ import org.apache.log.Hierarchy;
|
|||||||
import org.apache.log.Logger;
|
import org.apache.log.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of {@code org.apache.commons.logging.Log}
|
* Implements {@code org.apache.commons.logging.Log}
|
||||||
* that wraps the <a href="https://avalon.apache.org/logkit/">avalon-logkit</a>
|
* to wrap the <a href="https://avalon.apache.org/logkit/">Apache Avalon Logkit</a>
|
||||||
* logging system. Configuration of {@code LogKit} is left to the user.
|
* logging system. Configuration of {@code LogKit} is left to the user.
|
||||||
* <p>
|
* <p>
|
||||||
* {@code LogKit} accepts only {@code String} messages.
|
* {@code LogKit} accepts only {@code String} messages.
|
||||||
* Therefore, this implementation converts object messages into strings
|
* Therefore, this implementation converts object messages into strings
|
||||||
* by called their {@code toString()} method before logging them.
|
* by called their {@code toString()} method before logging them.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @deprecated Scheduled for removal because the Apache Avalon Project has been discontinued.
|
* @deprecated Scheduled for removal because the Apache Avalon Project has been discontinued.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -30,12 +30,13 @@ import java.util.Objects;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of {@code Hashtable} that uses {@code WeakReference}'s
|
* Implements {@code Hashtable} to use {@code WeakReference}'s
|
||||||
* to hold its keys thus allowing them to be reclaimed by the garbage collector.
|
* to hold its keys thus allowing them to be reclaimed by the garbage collector.
|
||||||
* The associated values are retained using strong references.
|
* The associated values are retained using strong references.
|
||||||
* <p>
|
* <p>
|
||||||
* This class follows the semantics of {@code Hashtable} as closely as
|
* This class follows the semantics of {@code Hashtable} as closely as
|
||||||
* possible. It therefore does not accept null values or keys.
|
* possible. It therefore does not accept null values or keys.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Note:</strong>
|
* <strong>Note:</strong>
|
||||||
* This is <em>not</em> intended to be a general purpose hash table replacement.
|
* This is <em>not</em> intended to be a general purpose hash table replacement.
|
||||||
@@ -43,12 +44,14 @@ import java.util.Set;
|
|||||||
* for {@code Hashtable} in {@code LogFactory}. This application requires
|
* for {@code Hashtable} in {@code LogFactory}. This application requires
|
||||||
* good liveliness for {@code get} and {@code put}. Various tradeoffs
|
* good liveliness for {@code get} and {@code put}. Various tradeoffs
|
||||||
* have been made with this in mind.
|
* have been made with this in mind.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Usage:</strong> typical use case is as a drop-in replacement
|
* <strong>Usage:</strong> typical use case is as a drop-in replacement
|
||||||
* for the {@code Hashtable} used in {@code LogFactory} for J2EE environments
|
* for the {@code Hashtable} used in {@code LogFactory} for J2EE environments
|
||||||
* running 1.3+ JVMs. Use of this class <i>in most cases</i> (see below) will
|
* running 1.3+ JVMs. Use of this class <i>in most cases</i> (see below) will
|
||||||
* allow class loaders to be collected by the garbage collector without the need
|
* allow class loaders to be collected by the garbage collector without the need
|
||||||
* to call {@link org.apache.commons.logging.LogFactory#release(ClassLoader) LogFactory.release(ClassLoader)}.
|
* to call {@link org.apache.commons.logging.LogFactory#release(ClassLoader) LogFactory.release(ClassLoader)}.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* {@code org.apache.commons.logging.LogFactory} checks whether this class
|
* {@code org.apache.commons.logging.LogFactory} checks whether this class
|
||||||
* can be supported by the current JVM, and if so then uses it to store
|
* can be supported by the current JVM, and if so then uses it to store
|
||||||
@@ -61,6 +64,7 @@ import java.util.Set;
|
|||||||
* And by the way, this extends {@code Hashtable} rather than {@code HashMap}
|
* And by the way, this extends {@code Hashtable} rather than {@code HashMap}
|
||||||
* for backwards compatibility reasons. See the documentation
|
* for backwards compatibility reasons. See the documentation
|
||||||
* for method {@code LogFactory.createFactoryStore} for more details.
|
* for method {@code LogFactory.createFactoryStore} for more details.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* The reason all this is necessary is due to a issue which
|
* The reason all this is necessary is due to a issue which
|
||||||
* arises during hot deploy in a J2EE-like containers.
|
* arises during hot deploy in a J2EE-like containers.
|
||||||
@@ -78,11 +82,13 @@ import java.util.Set;
|
|||||||
* bundles commons-logging by default. However, holding the class loader
|
* bundles commons-logging by default. However, holding the class loader
|
||||||
* references weakly ensures that the class loader will be garbage collected
|
* references weakly ensures that the class loader will be garbage collected
|
||||||
* without the container performing this step.
|
* without the container performing this step.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Limitations:</strong>
|
* <strong>Limitations:</strong>
|
||||||
* There is still one (unusual) scenario in which a component will not
|
* There is still one (unusual) scenario in which a component will not
|
||||||
* be correctly unloaded without an explicit release. Though weak references
|
* be correctly unloaded without an explicit release. Though weak references
|
||||||
* are used for its keys, it is necessary to use strong references for its values.
|
* are used for its keys, it is necessary to use strong references for its values.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* If the abstract class {@code LogFactory} is
|
* If the abstract class {@code LogFactory} is
|
||||||
* loaded by the container class loader but a subclass of
|
* loaded by the container class loader but a subclass of
|
||||||
@@ -93,17 +99,20 @@ import java.util.Set;
|
|||||||
* the LogFactory1 instance to the component class loader via
|
* the LogFactory1 instance to the component class loader via
|
||||||
* {@code getClass().getClassLoader()}. This chain of references will prevent
|
* {@code getClass().getClassLoader()}. This chain of references will prevent
|
||||||
* collection of the child class loader.
|
* collection of the child class loader.
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Such a situation occurs when the commons-logging.jar is
|
* Such a situation occurs when the commons-logging.jar is
|
||||||
* loaded by a parent class loader (e.g. a server level class loader in a
|
* loaded by a parent class loader (e.g. a server level class loader in a
|
||||||
* servlet container) and a custom {@code LogFactory} implementation is
|
* servlet container) and a custom {@code LogFactory} implementation is
|
||||||
* loaded by a child class loader (e.g. a web app class loader).
|
* loaded by a child class loader (e.g. a web app class loader).
|
||||||
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* To avoid this scenario, ensure
|
* To avoid this scenario, ensure
|
||||||
* that any custom LogFactory subclass is loaded by the same class loader as
|
* that any custom LogFactory subclass is loaded by the same class loader as
|
||||||
* the base {@code LogFactory}. Creating custom LogFactory subclasses is,
|
* the base {@code LogFactory}. Creating custom LogFactory subclasses is,
|
||||||
* however, rare. The standard LogFactoryImpl class should be sufficient
|
* however, rare. The standard LogFactoryImpl class should be sufficient
|
||||||
* for most or all users.
|
* for most or all users.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
* @deprecated No longer used, will be removed in 2.0.
|
* @deprecated No longer used, will be removed in 2.0.
|
||||||
|
|||||||
Reference in New Issue
Block a user