Use Javadoc code tags instead of HTML (except when code blocks use tag
delimiters).
This commit is contained in:
@@ -23,7 +23,7 @@ package org.apache.commons.logging;
|
|||||||
* this interface must have a constructor that takes a single String
|
* this interface must have a constructor that takes a single String
|
||||||
* parameter representing the "name" of this Log.
|
* parameter representing the "name" of this Log.
|
||||||
* <p>
|
* <p>
|
||||||
* The six logging levels used by <code>Log</code> are (in order):
|
* The six logging levels used by {@code Log} are (in order):
|
||||||
* <ol>
|
* <ol>
|
||||||
* <li>trace (the least serious)</li>
|
* <li>trace (the least serious)</li>
|
||||||
* <li>debug</li>
|
* <li>debug</li>
|
||||||
@@ -122,7 +122,7 @@ public interface Log {
|
|||||||
* Is debug logging currently enabled?
|
* Is debug logging currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* Call this method to prevent having to perform expensive operations
|
* Call this method to prevent having to perform expensive operations
|
||||||
* (for example, <code>String</code> concatenation)
|
* (for example, {@code String} concatenation)
|
||||||
* when the log level is more than debug.
|
* when the log level is more than debug.
|
||||||
*
|
*
|
||||||
* @return true if debug is enabled in the underlying logger.
|
* @return true if debug is enabled in the underlying logger.
|
||||||
@@ -133,7 +133,7 @@ public interface Log {
|
|||||||
* Is error logging currently enabled?
|
* Is error logging currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* Call this method to prevent having to perform expensive operations
|
* Call this method to prevent having to perform expensive operations
|
||||||
* (for example, <code>String</code> concatenation)
|
* (for example, {@code String} concatenation)
|
||||||
* when the log level is more than error.
|
* when the log level is more than error.
|
||||||
*
|
*
|
||||||
* @return true if error is enabled in the underlying logger.
|
* @return true if error is enabled in the underlying logger.
|
||||||
@@ -144,7 +144,7 @@ public interface Log {
|
|||||||
* Is fatal logging currently enabled?
|
* Is fatal logging currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* Call this method to prevent having to perform expensive operations
|
* Call this method to prevent having to perform expensive operations
|
||||||
* (for example, <code>String</code> concatenation)
|
* (for example, {@code String} concatenation)
|
||||||
* when the log level is more than fatal.
|
* when the log level is more than fatal.
|
||||||
*
|
*
|
||||||
* @return true if fatal is enabled in the underlying logger.
|
* @return true if fatal is enabled in the underlying logger.
|
||||||
@@ -155,7 +155,7 @@ public interface Log {
|
|||||||
* Is info logging currently enabled?
|
* Is info logging currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* Call this method to prevent having to perform expensive operations
|
* Call this method to prevent having to perform expensive operations
|
||||||
* (for example, <code>String</code> concatenation)
|
* (for example, {@code String} concatenation)
|
||||||
* when the log level is more than info.
|
* when the log level is more than info.
|
||||||
*
|
*
|
||||||
* @return true if info is enabled in the underlying logger.
|
* @return true if info is enabled in the underlying logger.
|
||||||
@@ -166,7 +166,7 @@ public interface Log {
|
|||||||
* Is trace logging currently enabled?
|
* Is trace logging currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* Call this method to prevent having to perform expensive operations
|
* Call this method to prevent having to perform expensive operations
|
||||||
* (for example, <code>String</code> concatenation)
|
* (for example, {@code String} concatenation)
|
||||||
* when the log level is more than trace.
|
* when the log level is more than trace.
|
||||||
*
|
*
|
||||||
* @return true if trace is enabled in the underlying logger.
|
* @return true if trace is enabled in the underlying logger.
|
||||||
@@ -177,7 +177,7 @@ public interface Log {
|
|||||||
* Is warn logging currently enabled?
|
* Is warn logging currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* Call this method to prevent having to perform expensive operations
|
* Call this method to prevent having to perform expensive operations
|
||||||
* (for example, <code>String</code> concatenation)
|
* (for example, {@code String} concatenation)
|
||||||
* when the log level is more than warn.
|
* when the log level is more than warn.
|
||||||
*
|
*
|
||||||
* @return true if warn is enabled in the underlying logger.
|
* @return true if warn is enabled in the underlying logger.
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
package org.apache.commons.logging;
|
package org.apache.commons.logging;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An exception that is thrown only if a suitable <code>LogFactory</code>
|
* An exception that is thrown only if a suitable {@code LogFactory}
|
||||||
* or <code>Log</code> instance cannot be created by the corresponding
|
* or {@code Log} instance cannot be created by the corresponding
|
||||||
* factory methods.
|
* factory methods.
|
||||||
*
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
@@ -30,7 +30,7 @@ public class LogConfigurationException extends RuntimeException {
|
|||||||
private static final long serialVersionUID = 8486587136871052495L;
|
private static final long serialVersionUID = 8486587136871052495L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new exception with <code>null</code> as its detail message.
|
* Construct a new exception with {@code null} as its detail message.
|
||||||
*/
|
*/
|
||||||
public LogConfigurationException() {
|
public LogConfigurationException() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,21 +71,21 @@ public abstract class LogFactory {
|
|||||||
// ----------------------------------------------------- Manifest Constants
|
// ----------------------------------------------------- Manifest Constants
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>priority</code>) of the key in the config file used to
|
* The name ({@code priority}) of the key in the config file used to
|
||||||
* specify the priority of that particular config file. The associated value
|
* specify the priority of that particular config file. The associated value
|
||||||
* is a floating-point number; higher values take priority over lower values.
|
* is a floating-point number; higher values take priority over lower values.
|
||||||
*/
|
*/
|
||||||
public static final String PRIORITY_KEY = "priority";
|
public static final String PRIORITY_KEY = "priority";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>use_tccl</code>) of the key in the config file used
|
* The name ({@code use_tccl}) of the key in the config file used
|
||||||
* to specify whether logging classes should be loaded via the thread
|
* to specify whether logging classes should be loaded via the thread
|
||||||
* context class loader (TCCL), or not. By default, the TCCL is used.
|
* context class loader (TCCL), or not. By default, the TCCL is used.
|
||||||
*/
|
*/
|
||||||
public static final String TCCL_KEY = "use_tccl";
|
public static final String TCCL_KEY = "use_tccl";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>org.apache.commons.logging.LogFactory</code>) of the property
|
* The name ({@code org.apache.commons.logging.LogFactory}) of the property
|
||||||
* used to identify the LogFactory implementation
|
* used to identify the LogFactory implementation
|
||||||
* class name. This can be used as a system property, or as an entry in a
|
* class name. This can be used as a system property, or as an entry in a
|
||||||
* configuration properties file.
|
* configuration properties file.
|
||||||
@@ -93,13 +93,13 @@ public abstract class LogFactory {
|
|||||||
public static final String FACTORY_PROPERTY = "org.apache.commons.logging.LogFactory";
|
public static final String FACTORY_PROPERTY = "org.apache.commons.logging.LogFactory";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The fully qualified class name of the fallback <code>LogFactory</code>
|
* The fully qualified class name of the fallback {@code LogFactory}
|
||||||
* implementation class to use, if no other can be found.
|
* implementation class to use, if no other can be found.
|
||||||
*/
|
*/
|
||||||
public static final String FACTORY_DEFAULT = "org.apache.commons.logging.impl.LogFactoryImpl";
|
public static final String FACTORY_DEFAULT = "org.apache.commons.logging.impl.LogFactoryImpl";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>commons-logging.properties</code>) of the properties file to search for.
|
* The name ({@code commons-logging.properties}) of the properties file to search for.
|
||||||
*/
|
*/
|
||||||
public static final String FACTORY_PROPERTIES = "commons-logging.properties";
|
public static final String FACTORY_PROPERTIES = "commons-logging.properties";
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ public abstract class LogFactory {
|
|||||||
"META-INF/services/org.apache.commons.logging.LogFactory";
|
"META-INF/services/org.apache.commons.logging.LogFactory";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>org.apache.commons.logging.diagnostics.dest</code>)
|
* The name ({@code org.apache.commons.logging.diagnostics.dest})
|
||||||
* of the property used to enable internal commons-logging
|
* of the property used to enable internal commons-logging
|
||||||
* diagnostic output, in order to get information on what logging
|
* diagnostic output, in order to get information on what logging
|
||||||
* implementations are being discovered, what classloaders they
|
* implementations are being discovered, what classloaders they
|
||||||
@@ -144,18 +144,18 @@ public abstract class LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Setting this system property
|
* Setting this system property
|
||||||
* (<code>org.apache.commons.logging.LogFactory.HashtableImpl</code>)
|
* ({@code org.apache.commons.logging.LogFactory.HashtableImpl})
|
||||||
* value allows the <code>Hashtable</code> used to store
|
* value allows the {@code Hashtable} used to store
|
||||||
* classloaders to be substituted by an alternative implementation.
|
* classloaders to be substituted by an alternative implementation.
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Note:</strong> <code>LogFactory</code> will print:
|
* <strong>Note:</strong> {@code LogFactory} will print:
|
||||||
* <pre>
|
* <pre>
|
||||||
* [ERROR] LogFactory: Load of custom hashtable failed
|
* [ERROR] LogFactory: Load of custom hashtable failed
|
||||||
* </pre>
|
* </pre>
|
||||||
* to system error and then continue using a standard Hashtable.
|
* to system error and then continue using a standard Hashtable.
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Usage:</strong> Set this property when Java is invoked
|
* <strong>Usage:</strong> Set this property when Java is invoked
|
||||||
* and <code>LogFactory</code> will attempt to load a new instance
|
* and {@code LogFactory} will attempt to load a new instance
|
||||||
* of the given implementation class.
|
* of the given implementation class.
|
||||||
* For example, running the following ant scriplet:
|
* For example, running the following ant scriplet:
|
||||||
* <pre>
|
* <pre>
|
||||||
@@ -166,8 +166,8 @@ public abstract class LogFactory {
|
|||||||
* value="org.apache.commons.logging.AltHashtable"/>
|
* value="org.apache.commons.logging.AltHashtable"/>
|
||||||
* </java>
|
* </java>
|
||||||
* </pre>
|
* </pre>
|
||||||
* will mean that <code>LogFactory</code> will load an instance of
|
* will mean that {@code LogFactory} will load an instance of
|
||||||
* <code>org.apache.commons.logging.AltHashtable</code>.
|
* {@code org.apache.commons.logging.AltHashtable}.
|
||||||
* <p>
|
* <p>
|
||||||
* A typical use case is to allow a custom
|
* A typical use case is to allow a custom
|
||||||
* Hashtable implementation using weak references to be substituted.
|
* Hashtable implementation using weak references to be substituted.
|
||||||
@@ -202,7 +202,7 @@ public abstract class LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the configuration attribute with the specified name (if any),
|
* Return the configuration attribute with the specified name (if any),
|
||||||
* or <code>null</code> if there is no such attribute.
|
* or {@code null} if there is no such attribute.
|
||||||
*
|
*
|
||||||
* @param name Name of the attribute to return
|
* @param name Name of the attribute to return
|
||||||
*/
|
*/
|
||||||
@@ -217,29 +217,29 @@ public abstract class LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method to derive a name from the specified class and
|
* Convenience method to derive a name from the specified class and
|
||||||
* call <code>getInstance(String)</code> with it.
|
* call {@code getInstance(String)} with it.
|
||||||
*
|
*
|
||||||
* @param clazz Class for which a suitable Log name will be derived
|
* @param clazz Class for which a suitable Log name will be derived
|
||||||
* @throws LogConfigurationException if a suitable <code>Log</code>
|
* @throws LogConfigurationException if a suitable {@code Log}
|
||||||
* instance cannot be returned
|
* instance cannot be returned
|
||||||
*/
|
*/
|
||||||
public abstract Log getInstance(Class clazz)
|
public abstract Log getInstance(Class clazz)
|
||||||
throws LogConfigurationException;
|
throws LogConfigurationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct (if necessary) and return a <code>Log</code> instance,
|
* Construct (if necessary) and return a {@code Log} instance,
|
||||||
* using the factory's current set of configuration attributes.
|
* using the factory's current set of configuration attributes.
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>NOTE</strong> - Depending upon the implementation of
|
* <strong>NOTE</strong> - Depending upon the implementation of
|
||||||
* the <code>LogFactory</code> you are using, the <code>Log</code>
|
* the {@code LogFactory} you are using, the {@code Log}
|
||||||
* instance you are returned may or may not be local to the current
|
* instance you are returned may or may not be local to the current
|
||||||
* application, and may or may not be returned again on a subsequent
|
* application, and may or may not be returned again on a subsequent
|
||||||
* call with the same name argument.
|
* call with the same name argument.
|
||||||
*
|
*
|
||||||
* @param name Logical name of the <code>Log</code> instance to be
|
* @param name Logical name of the {@code Log} instance to be
|
||||||
* returned (the meaning of this name is only known to the underlying
|
* returned (the meaning of this name is only known to the underlying
|
||||||
* logging implementation that is being wrapped)
|
* logging implementation that is being wrapped)
|
||||||
* @throws LogConfigurationException if a suitable <code>Log</code>
|
* @throws LogConfigurationException if a suitable {@code Log}
|
||||||
* instance cannot be returned
|
* instance cannot be returned
|
||||||
*/
|
*/
|
||||||
public abstract Log getInstance(String name)
|
public abstract Log getInstance(String name)
|
||||||
@@ -264,11 +264,11 @@ public abstract class LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the configuration attribute with the specified name. Calling
|
* Set the configuration attribute with the specified name. Calling
|
||||||
* this with a <code>null</code> value is equivalent to calling
|
* this with a {@code null} value is equivalent to calling
|
||||||
* <code>removeAttribute(name)</code>.
|
* {@code removeAttribute(name)}.
|
||||||
*
|
*
|
||||||
* @param name Name of the attribute to set
|
* @param name Name of the attribute to set
|
||||||
* @param value Value of the attribute to set, or <code>null</code>
|
* @param value Value of the attribute to set, or {@code null}
|
||||||
* to remove any setting for this attribute
|
* to remove any setting for this attribute
|
||||||
*/
|
*/
|
||||||
public abstract void setAttribute(String name, Object value);
|
public abstract void setAttribute(String name, Object value);
|
||||||
@@ -276,15 +276,15 @@ public abstract class LogFactory {
|
|||||||
// ------------------------------------------------------- Static Variables
|
// ------------------------------------------------------- Static Variables
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The previously constructed <code>LogFactory</code> instances, keyed by
|
* The previously constructed {@code LogFactory} instances, keyed by
|
||||||
* the <code>ClassLoader</code> with which it was created.
|
* the {@code ClassLoader} with which it was created.
|
||||||
*/
|
*/
|
||||||
protected static Hashtable factories;
|
protected static Hashtable factories;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Previously constructed <code>LogFactory</code> instance as in the
|
* Previously constructed {@code LogFactory} instance as in the
|
||||||
* <code>factories</code> map, but for the case where
|
* {@code factories} map, but for the case where
|
||||||
* <code>getClassLoader</code> returns <code>null</code>.
|
* {@code getClassLoader} returns {@code null}.
|
||||||
* This can happen when:
|
* This can happen when:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>using JDK1.1 and the calling code is loaded via the system
|
* <li>using JDK1.1 and the calling code is loaded via the system
|
||||||
@@ -292,7 +292,7 @@ public abstract class LogFactory {
|
|||||||
* <li>using JDK1.2+ and the calling code is loaded via the boot
|
* <li>using JDK1.2+ and the calling code is loaded via the boot
|
||||||
* classloader (only likely for embedded systems work).</li>
|
* classloader (only likely for embedded systems work).</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* Note that <code>factories</code> is a <i>Hashtable</i> (not a HashMap),
|
* Note that {@code factories} is a <i>Hashtable</i> (not a HashMap),
|
||||||
* and hashtables don't allow null as a key.
|
* and hashtables don't allow null as a key.
|
||||||
* @deprecated since 1.1.2
|
* @deprecated since 1.1.2
|
||||||
*/
|
*/
|
||||||
@@ -386,27 +386,27 @@ public abstract class LogFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct (if necessary) and return a <code>LogFactory</code>
|
* Construct (if necessary) and return a {@code LogFactory}
|
||||||
* instance, using the following ordered lookup procedure to determine
|
* instance, using the following ordered lookup procedure to determine
|
||||||
* the name of the implementation class to be loaded.
|
* the name of the implementation class to be loaded.
|
||||||
* <p>
|
* <p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>The <code>org.apache.commons.logging.LogFactory</code> system
|
* <li>The {@code org.apache.commons.logging.LogFactory} system
|
||||||
* property.</li>
|
* property.</li>
|
||||||
* <li>The JDK 1.3 Service Discovery mechanism</li>
|
* <li>The JDK 1.3 Service Discovery mechanism</li>
|
||||||
* <li>Use the properties file <code>commons-logging.properties</code>
|
* <li>Use the properties file {@code commons-logging.properties}
|
||||||
* file, if found in the class path of this class. The configuration
|
* file, if found in the class path of this class. The configuration
|
||||||
* file is in standard <code>java.util.Properties</code> format and
|
* file is in standard {@code java.util.Properties} format and
|
||||||
* contains the fully qualified name of the implementation class
|
* contains the fully qualified name of the implementation class
|
||||||
* with the key being the system property defined above.</li>
|
* with the key being the system property defined above.</li>
|
||||||
* <li>Fall back to a default implementation class
|
* <li>Fall back to a default implementation class
|
||||||
* (<code>org.apache.commons.logging.impl.LogFactoryImpl</code>).</li>
|
* ({@code org.apache.commons.logging.impl.LogFactoryImpl}).</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* <em>NOTE</em> - If the properties file method of identifying the
|
* <em>NOTE</em> - If the properties file method of identifying the
|
||||||
* <code>LogFactory</code> implementation class is utilized, all of the
|
* {@code LogFactory} implementation class is utilized, all of the
|
||||||
* properties defined in this file will be set as configuration attributes
|
* properties defined in this file will be set as configuration attributes
|
||||||
* on the corresponding <code>LogFactory</code> instance.
|
* on the corresponding {@code LogFactory} instance.
|
||||||
* <p>
|
* <p>
|
||||||
* <em>NOTE</em> - In a multi-threaded environment it is possible
|
* <em>NOTE</em> - In a multi-threaded environment it is possible
|
||||||
* that two different instances will be returned for the same
|
* that two different instances will be returned for the same
|
||||||
@@ -649,7 +649,7 @@ public abstract class LogFactory {
|
|||||||
* having to care about factories.
|
* having to care about factories.
|
||||||
*
|
*
|
||||||
* @param clazz Class from which a log name will be derived
|
* @param clazz Class from which a log name will be derived
|
||||||
* @throws LogConfigurationException if a suitable <code>Log</code>
|
* @throws LogConfigurationException if a suitable {@code Log}
|
||||||
* instance cannot be returned
|
* instance cannot be returned
|
||||||
*/
|
*/
|
||||||
public static Log getLog(final Class clazz) throws LogConfigurationException {
|
public static Log getLog(final Class clazz) throws LogConfigurationException {
|
||||||
@@ -660,10 +660,10 @@ public abstract class LogFactory {
|
|||||||
* Convenience method to return a named logger, without the application
|
* Convenience method to return a named logger, without the application
|
||||||
* having to care about factories.
|
* having to care about factories.
|
||||||
*
|
*
|
||||||
* @param name Logical name of the <code>Log</code> instance to be
|
* @param name Logical name of the {@code Log} instance to be
|
||||||
* returned (the meaning of this name is only known to the underlying
|
* returned (the meaning of this name is only known to the underlying
|
||||||
* logging implementation that is being wrapped)
|
* logging implementation that is being wrapped)
|
||||||
* @throws LogConfigurationException if a suitable <code>Log</code>
|
* @throws LogConfigurationException if a suitable {@code Log}
|
||||||
* instance cannot be returned
|
* instance cannot be returned
|
||||||
*/
|
*/
|
||||||
public static Log getLog(final String name) throws LogConfigurationException {
|
public static Log getLog(final String name) throws LogConfigurationException {
|
||||||
@@ -673,7 +673,7 @@ public abstract class LogFactory {
|
|||||||
/**
|
/**
|
||||||
* Release any internal references to previously created {@link LogFactory}
|
* Release any internal references to previously created {@link LogFactory}
|
||||||
* instances that have been associated with the specified class loader
|
* instances that have been associated with the specified class loader
|
||||||
* (if any), after calling the instance method <code>release()</code> on
|
* (if any), after calling the instance method {@code release()} on
|
||||||
* each of them.
|
* each of them.
|
||||||
*
|
*
|
||||||
* @param classLoader ClassLoader for which to release the LogFactory
|
* @param classLoader ClassLoader for which to release the LogFactory
|
||||||
@@ -702,7 +702,7 @@ public abstract class LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Release any internal references to previously created {@link LogFactory}
|
* Release any internal references to previously created {@link LogFactory}
|
||||||
* instances, after calling the instance method <code>release()</code> on
|
* instances, after calling the instance method {@code release()} on
|
||||||
* each of them. This is useful in environments like servlet containers,
|
* each of them. This is useful in environments like servlet containers,
|
||||||
* which implement application reloading by throwing away a ClassLoader.
|
* which implement application reloading by throwing away a ClassLoader.
|
||||||
* Dangling references to objects in that class loader would prevent
|
* Dangling references to objects in that class loader would prevent
|
||||||
@@ -905,7 +905,7 @@ public abstract class LogFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a new instance of the specified <code>LogFactory</code>
|
* Return a new instance of the specified {@code LogFactory}
|
||||||
* implementation class, loaded by the specified class loader.
|
* implementation class, loaded by the specified class loader.
|
||||||
* If that fails, try the class loader used to load this
|
* If that fails, try the class loader used to load this
|
||||||
* (abstract) LogFactory.
|
* (abstract) LogFactory.
|
||||||
@@ -939,7 +939,7 @@ public abstract class LogFactory {
|
|||||||
* long as the only LogFactory class it can find to bind to is in the
|
* long as the only LogFactory class it can find to bind to is in the
|
||||||
* parent classloader.
|
* parent classloader.
|
||||||
*
|
*
|
||||||
* @param factoryClass Fully qualified name of the <code>LogFactory</code>
|
* @param factoryClass Fully qualified name of the {@code LogFactory}
|
||||||
* implementation class
|
* implementation class
|
||||||
* @param classLoader ClassLoader from which to load this class
|
* @param classLoader ClassLoader from which to load this class
|
||||||
* @param contextClassLoader is the context that this new factory will
|
* @param contextClassLoader is the context that this new factory will
|
||||||
@@ -1162,16 +1162,16 @@ public abstract class LogFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether the given class actually implements <code>LogFactory</code>.
|
* Determines whether the given class actually implements {@code LogFactory}.
|
||||||
* Diagnostic information is also logged.
|
* Diagnostic information is also logged.
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Usage:</strong> to diagnose whether a classloader conflict is the cause
|
* <strong>Usage:</strong> to diagnose whether a classloader conflict is the cause
|
||||||
* of incompatibility. The test used is whether the class is assignable from
|
* of incompatibility. The test used is whether the class is assignable from
|
||||||
* the <code>LogFactory</code> class loaded by the class's classloader.
|
* the {@code LogFactory} class loaded by the class's classloader.
|
||||||
* @param logFactoryClass <code>Class</code> which may implement <code>LogFactory</code>
|
* @param logFactoryClass {@code Class} which may implement {@code LogFactory}
|
||||||
* @return true if the <code>logFactoryClass</code> does extend
|
* @return true if the {@code logFactoryClass} does extend
|
||||||
* <code>LogFactory</code> when that class is loaded via the same
|
* {@code LogFactory} when that class is loaded via the same
|
||||||
* classloader that loaded the <code>logFactoryClass</code>.
|
* classloader that loaded the {@code logFactoryClass}.
|
||||||
*/
|
*/
|
||||||
private static boolean implementsLogFactory(final Class logFactoryClass) {
|
private static boolean implementsLogFactory(final Class logFactoryClass) {
|
||||||
boolean implementsLogFactory = false;
|
boolean implementsLogFactory = false;
|
||||||
|
|||||||
@@ -24,27 +24,27 @@ import org.apache.commons.logging.impl.NoOpLog;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory for creating {@link Log} instances. Applications should call
|
* Factory for creating {@link Log} instances. Applications should call
|
||||||
* the <code>makeNewLogInstance()</code> method to instantiate new instances
|
* the {@code makeNewLogInstance()} method to instantiate new instances
|
||||||
* of the configured {@link Log} implementation class.
|
* of the configured {@link Log} implementation class.
|
||||||
* <p>
|
* <p>
|
||||||
* By default, calling <code>getInstance()</code> will use the following
|
* By default, calling {@code getInstance()} will use the following
|
||||||
* algorithm:
|
* algorithm:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>If Log4J is available, return an instance of
|
* <li>If Log4J is available, return an instance of
|
||||||
* <code>org.apache.commons.logging.impl.Log4JLogger</code>.</li>
|
* {@code org.apache.commons.logging.impl.Log4JLogger}.</li>
|
||||||
* <li>If JDK 1.4 or later is available, return an instance of
|
* <li>If JDK 1.4 or later is available, return an instance of
|
||||||
* <code>org.apache.commons.logging.impl.Jdk14Logger</code>.</li>
|
* {@code org.apache.commons.logging.impl.Jdk14Logger}.</li>
|
||||||
* <li>Otherwise, return an instance of
|
* <li>Otherwise, return an instance of
|
||||||
* <code>org.apache.commons.logging.impl.NoOpLog</code>.</li>
|
* {@code org.apache.commons.logging.impl.NoOpLog}.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* You can change the default behavior in one of two ways:
|
* You can change the default behavior in one of two ways:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>On the startup command line, set the system property
|
* <li>On the startup command line, set the system property
|
||||||
* <code>org.apache.commons.logging.log</code> to the name of the
|
* {@code org.apache.commons.logging.log} to the name of the
|
||||||
* <code>org.apache.commons.logging.Log</code> implementation class
|
* {@code org.apache.commons.logging.Log} implementation class
|
||||||
* you want to use.</li>
|
* you want to use.</li>
|
||||||
* <li>At runtime, call <code>LogSource.setLogImplementation()</code>.</li>
|
* <li>At runtime, call {@code LogSource.setLogImplementation()}.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link LogFactory} instead - The default factory
|
* @deprecated Use {@link LogFactory} instead - The default factory
|
||||||
@@ -169,7 +169,7 @@ public class LogSource {
|
|||||||
logImplctor = logclass.getConstructor(argtypes);
|
logImplctor = logclass.getConstructor(argtypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get a <code>Log</code> instance by class name. */
|
/** Get a {@code Log} instance by class name. */
|
||||||
static public Log getInstance(final String name) {
|
static public Log getInstance(final String name) {
|
||||||
Log log = (Log) logs.get(name);
|
Log log = (Log) logs.get(name);
|
||||||
if (null == log) {
|
if (null == log) {
|
||||||
@@ -179,7 +179,7 @@ public class LogSource {
|
|||||||
return log;
|
return log;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get a <code>Log</code> instance by class. */
|
/** Get a {@code Log} instance by class. */
|
||||||
static public Log getInstance(final Class clazz) {
|
static public Log getInstance(final Class clazz) {
|
||||||
return getInstance(clazz.getName());
|
return getInstance(clazz.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ import org.apache.commons.logging.Log;
|
|||||||
* particularly useful when using a property setter.
|
* particularly useful when using a property setter.
|
||||||
* </li>
|
* </li>
|
||||||
* <li>the {@link #setDefaultLogger} class property can be called which
|
* <li>the {@link #setDefaultLogger} class property can be called which
|
||||||
* sets the ancestral Avalon logger for this class. Any <code>AvalonLogger</code>
|
* sets the ancestral Avalon logger for this class. Any {@code AvalonLogger}
|
||||||
* instances created through the <code>LogFactory</code> mechanisms will output
|
* instances created through the {@code LogFactory} mechanisms will output
|
||||||
* to child loggers of this <code>Logger</code>.
|
* to child loggers of this {@code Logger}.
|
||||||
* </li>
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Note:</strong> <code>AvalonLogger</code> does not implement Serializable
|
* <strong>Note:</strong> {@code AvalonLogger} does not implement Serializable
|
||||||
* because the constructors available for it make this impossible to achieve in all
|
* because the constructors available for it make this impossible to achieve in all
|
||||||
* circumstances; there is no way to "reconnect" to an underlying Logger object on
|
* circumstances; there is no way to "reconnect" to an underlying Logger object on
|
||||||
* deserialization if one was just passed in to the constructor of the original
|
* deserialization if one was just passed in to the constructor of the original
|
||||||
@@ -58,8 +58,8 @@ public class AvalonLogger implements Log {
|
|||||||
private final transient Logger logger;
|
private final transient Logger logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>AvalonLogger</code> that outputs to the given
|
* Constructs an {@code AvalonLogger} that outputs to the given
|
||||||
* <code>Logger</code> instance.
|
* {@code Logger} instance.
|
||||||
*
|
*
|
||||||
* @param logger the Avalon logger implementation to delegate to
|
* @param logger the Avalon logger implementation to delegate to
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +68,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>AvalonLogger</code> that will log to a child
|
* Constructs an {@code AvalonLogger} that will log to a child
|
||||||
* of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
|
* of the <code>Logger</code> set by calling {@link #setDefaultLogger}.
|
||||||
*
|
*
|
||||||
* @param name the name of the avalon logger implementation to delegate to
|
* @param name the name of the avalon logger implementation to delegate to
|
||||||
@@ -100,7 +100,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.debug</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.debug}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -114,7 +114,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.debug</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.debug}.
|
||||||
*
|
*
|
||||||
* @param message to log.
|
* @param message to log.
|
||||||
* @see org.apache.commons.logging.Log#debug(Object)
|
* @see org.apache.commons.logging.Log#debug(Object)
|
||||||
@@ -127,7 +127,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.error</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.error}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -141,7 +141,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.error</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.error}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#error(Object)
|
* @see org.apache.commons.logging.Log#error(Object)
|
||||||
@@ -154,7 +154,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.fatalError</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.fatalError}.
|
||||||
*
|
*
|
||||||
* @param message to log.
|
* @param message to log.
|
||||||
* @param t log this cause.
|
* @param t log this cause.
|
||||||
@@ -168,7 +168,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.fatalError</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.fatalError}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#fatal(Object)
|
* @see org.apache.commons.logging.Log#fatal(Object)
|
||||||
@@ -181,7 +181,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.info</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.info}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -195,7 +195,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.info</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.info}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#info(Object)
|
* @see org.apache.commons.logging.Log#info(Object)
|
||||||
@@ -208,7 +208,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is logging to <code>org.apache.avalon.framework.logger.Logger.debug</code> enabled?
|
* Is logging to {@code org.apache.avalon.framework.logger.Logger.debug} enabled?
|
||||||
* @see org.apache.commons.logging.Log#isDebugEnabled()
|
* @see org.apache.commons.logging.Log#isDebugEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -217,7 +217,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is logging to <code>org.apache.avalon.framework.logger.Logger.error</code> enabled?
|
* Is logging to {@code org.apache.avalon.framework.logger.Logger.error} enabled?
|
||||||
* @see org.apache.commons.logging.Log#isErrorEnabled()
|
* @see org.apache.commons.logging.Log#isErrorEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -226,7 +226,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is logging to <code>org.apache.avalon.framework.logger.Logger.fatalError</code> enabled?
|
* Is logging to {@code org.apache.avalon.framework.logger.Logger.fatalError} enabled?
|
||||||
* @see org.apache.commons.logging.Log#isFatalEnabled()
|
* @see org.apache.commons.logging.Log#isFatalEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -235,7 +235,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is logging to <code>org.apache.avalon.framework.logger.Logger.info</code> enabled?
|
* Is logging to {@code org.apache.avalon.framework.logger.Logger.info} enabled?
|
||||||
* @see org.apache.commons.logging.Log#isInfoEnabled()
|
* @see org.apache.commons.logging.Log#isInfoEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -244,7 +244,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is logging to <code>org.apache.avalon.framework.logger.Logger.debug</code> enabled?
|
* Is logging to {@code org.apache.avalon.framework.logger.Logger.debug} enabled?
|
||||||
* @see org.apache.commons.logging.Log#isTraceEnabled()
|
* @see org.apache.commons.logging.Log#isTraceEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -253,7 +253,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is logging to <code>org.apache.avalon.framework.logger.Logger.warn</code> enabled?
|
* Is logging to {@code org.apache.avalon.framework.logger.Logger.warn} enabled?
|
||||||
* @see org.apache.commons.logging.Log#isWarnEnabled()
|
* @see org.apache.commons.logging.Log#isWarnEnabled()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -262,7 +262,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.debug</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.debug}.
|
||||||
*
|
*
|
||||||
* @param message to log.
|
* @param message to log.
|
||||||
* @param t log this cause.
|
* @param t log this cause.
|
||||||
@@ -276,7 +276,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.debug</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.debug}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#trace(Object)
|
* @see org.apache.commons.logging.Log#trace(Object)
|
||||||
@@ -289,7 +289,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.warn</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.warn}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -303,7 +303,7 @@ public class AvalonLogger implements Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.avalon.framework.logger.Logger.warn</code>.
|
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.warn}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#warn(Object)
|
* @see org.apache.commons.logging.Log#warn(Object)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import java.io.StringWriter;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the <code>org.apache.commons.logging.Log</code>
|
* Implementation of the {@code org.apache.commons.logging.Log}
|
||||||
* interface that wraps the standard JDK logging mechanisms that are
|
* interface that wraps 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.
|
||||||
*
|
*
|
||||||
@@ -123,7 +123,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINE</code>.
|
* Logs a message with {@code java.util.logging.Level.FINE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#debug(Object)
|
* @see org.apache.commons.logging.Log#debug(Object)
|
||||||
@@ -134,7 +134,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINE</code>.
|
* Logs a message with {@code java.util.logging.Level.FINE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -146,7 +146,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#error(Object)
|
* @see org.apache.commons.logging.Log#error(Object)
|
||||||
@@ -157,7 +157,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -169,7 +169,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#fatal(Object)
|
* @see org.apache.commons.logging.Log#fatal(Object)
|
||||||
@@ -180,7 +180,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -202,7 +202,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.INFO</code>.
|
* Logs a message with {@code java.util.logging.Level.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#info(Object)
|
* @see org.apache.commons.logging.Log#info(Object)
|
||||||
@@ -213,7 +213,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.INFO</code>.
|
* Logs a message with {@code java.util.logging.Level.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -273,7 +273,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINEST</code>.
|
* Logs a message with {@code java.util.logging.Level.FINEST}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#trace(Object)
|
* @see org.apache.commons.logging.Log#trace(Object)
|
||||||
@@ -284,7 +284,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINEST</code>.
|
* Logs a message with {@code java.util.logging.Level.FINEST}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -296,7 +296,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.WARNING</code>.
|
* Logs a message with {@code java.util.logging.Level.WARNING}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#warn(Object)
|
* @see org.apache.commons.logging.Log#warn(Object)
|
||||||
@@ -307,7 +307,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.WARNING</code>.
|
* Logs a message with {@code java.util.logging.Level.WARNING}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ 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</code>
|
* Implementation of the {@code org.apache.commons.logging.Log}
|
||||||
* interface that wraps the standard JDK logging mechanisms that were
|
* interface that wraps the standard JDK logging mechanisms that were
|
||||||
* introduced in the Merlin release (JDK 1.4).
|
* introduced in the Merlin release (JDK 1.4).
|
||||||
*
|
*
|
||||||
@@ -94,7 +94,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
// --------------------------------------------------------- Public Methods
|
// --------------------------------------------------------- Public Methods
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINE</code>.
|
* Logs a message with {@code java.util.logging.Level.FINE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#debug(Object)
|
* @see org.apache.commons.logging.Log#debug(Object)
|
||||||
@@ -105,7 +105,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINE</code>.
|
* Logs a message with {@code java.util.logging.Level.FINE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -117,7 +117,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#error(Object)
|
* @see org.apache.commons.logging.Log#error(Object)
|
||||||
@@ -128,7 +128,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -140,7 +140,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#fatal(Object)
|
* @see org.apache.commons.logging.Log#fatal(Object)
|
||||||
@@ -151,7 +151,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.SEVERE</code>.
|
* Logs a message with {@code java.util.logging.Level.SEVERE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -173,7 +173,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.INFO</code>.
|
* Logs a message with {@code java.util.logging.Level.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#info(Object)
|
* @see org.apache.commons.logging.Log#info(Object)
|
||||||
@@ -184,7 +184,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.INFO</code>.
|
* Logs a message with {@code java.util.logging.Level.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -244,7 +244,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINEST</code>.
|
* Logs a message with {@code java.util.logging.Level.FINEST}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#trace(Object)
|
* @see org.apache.commons.logging.Log#trace(Object)
|
||||||
@@ -255,7 +255,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.FINEST</code>.
|
* Logs a message with {@code java.util.logging.Level.FINEST}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
@@ -267,7 +267,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.WARNING</code>.
|
* Logs a message with {@code java.util.logging.Level.WARNING}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#warn(Object)
|
* @see org.apache.commons.logging.Log#warn(Object)
|
||||||
@@ -278,7 +278,7 @@ public class Jdk14Logger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>java.util.logging.Level.WARNING</code>.
|
* Logs a message with {@code java.util.logging.Level.WARNING}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param exception log this cause
|
* @param exception log this cause
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.TRACE</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.TRACE}.
|
||||||
* When using a log4j version that does not support the <code>TRACE</code>
|
* When using a log4j version that does not support the {@code TRACE}
|
||||||
* level, the message will be logged at the <code>DEBUG</code> level.
|
* level, the message will be logged at the {@code DEBUG} level.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#trace(Object)
|
* @see org.apache.commons.logging.Log#trace(Object)
|
||||||
@@ -134,9 +134,9 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.TRACE</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.TRACE}.
|
||||||
* When using a log4j version that does not support the <code>TRACE</code>
|
* When using a log4j version that does not support the {@code TRACE}
|
||||||
* level, the message will be logged at the <code>DEBUG</code> level.
|
* level, the message will be logged at the {@code DEBUG} level.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -148,7 +148,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.DEBUG</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#debug(Object)
|
* @see org.apache.commons.logging.Log#debug(Object)
|
||||||
@@ -159,7 +159,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.DEBUG</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -171,7 +171,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.INFO</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#info(Object)
|
* @see org.apache.commons.logging.Log#info(Object)
|
||||||
@@ -182,7 +182,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.INFO</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -194,7 +194,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.WARN</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.WARN}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#warn(Object)
|
* @see org.apache.commons.logging.Log#warn(Object)
|
||||||
@@ -205,7 +205,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.WARN</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.WARN}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -217,7 +217,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.ERROR</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#error(Object)
|
* @see org.apache.commons.logging.Log#error(Object)
|
||||||
@@ -228,7 +228,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.ERROR</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -240,7 +240,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.FATAL</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.FATAL}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#fatal(Object)
|
* @see org.apache.commons.logging.Log#fatal(Object)
|
||||||
@@ -251,7 +251,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log4j.Priority.FATAL</code>.
|
* Logs a message with {@code org.apache.log4j.Priority.FATAL}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -279,7 +279,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the Log4j Logger used is enabled for <code>DEBUG</code> priority.
|
* Check whether the Log4j Logger used is enabled for {@code DEBUG} priority.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isDebugEnabled() {
|
public boolean isDebugEnabled() {
|
||||||
@@ -287,7 +287,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the Log4j Logger used is enabled for <code>ERROR</code> priority.
|
* Check whether the Log4j Logger used is enabled for {@code ERROR} priority.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isErrorEnabled() {
|
public boolean isErrorEnabled() {
|
||||||
@@ -295,7 +295,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the Log4j Logger used is enabled for <code>FATAL</code> priority.
|
* Check whether the Log4j Logger used is enabled for {@code FATAL} priority.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isFatalEnabled() {
|
public boolean isFatalEnabled() {
|
||||||
@@ -303,7 +303,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the Log4j Logger used is enabled for <code>INFO</code> priority.
|
* Check whether the Log4j Logger used is enabled for {@code INFO} priority.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isInfoEnabled() {
|
public boolean isInfoEnabled() {
|
||||||
@@ -311,9 +311,9 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the Log4j Logger used is enabled for <code>TRACE</code> priority.
|
* Check whether the Log4j Logger used is enabled for {@code TRACE} priority.
|
||||||
* When using a log4j version that does not support the TRACE level, this call
|
* When using a log4j version that does not support the TRACE level, this call
|
||||||
* will report whether <code>DEBUG</code> is enabled or not.
|
* will report whether {@code DEBUG} is enabled or not.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isTraceEnabled() {
|
public boolean isTraceEnabled() {
|
||||||
@@ -321,7 +321,7 @@ public class Log4JLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the Log4j Logger used is enabled for <code>WARN</code> priority.
|
* Check whether the Log4j Logger used is enabled for {@code WARN} priority.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isWarnEnabled() {
|
public boolean isWarnEnabled() {
|
||||||
|
|||||||
@@ -37,16 +37,16 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
* class to instantiate a wrapper for:
|
* class to instantiate a wrapper for:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Use a factory configuration attribute named
|
* <li>Use a factory configuration attribute named
|
||||||
* <code>org.apache.commons.logging.Log</code> to identify the
|
* {@code org.apache.commons.logging.Log} to identify the
|
||||||
* requested implementation class.</li>
|
* requested implementation class.</li>
|
||||||
* <li>Use the <code>org.apache.commons.logging.Log</code> system property
|
* <li>Use the {@code org.apache.commons.logging.Log} system property
|
||||||
* to identify the requested implementation class.</li>
|
* to identify the requested implementation class.</li>
|
||||||
* <li>If <em>Log4J</em> is available, return an instance of
|
* <li>If <em>Log4J</em> is available, return an instance of
|
||||||
* <code>org.apache.commons.logging.impl.Log4JLogger</code>.</li>
|
* {@code org.apache.commons.logging.impl.Log4JLogger}.</li>
|
||||||
* <li>If <em>JDK 1.4 or later</em> is available, return an instance of
|
* <li>If <em>JDK 1.4 or later</em> is available, return an instance of
|
||||||
* <code>org.apache.commons.logging.impl.Jdk14Logger</code>.</li>
|
* {@code org.apache.commons.logging.impl.Jdk14Logger}.</li>
|
||||||
* <li>Otherwise, return an instance of
|
* <li>Otherwise, return an instance of
|
||||||
* <code>org.apache.commons.logging.impl.SimpleLog</code>.</li>
|
* {@code org.apache.commons.logging.impl.SimpleLog}.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* If the selected {@link Log} implementation class has a
|
* If the selected {@link Log} implementation class has a
|
||||||
@@ -55,9 +55,9 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
* to identify the associated factory. This makes factory configuration
|
* to identify the associated factory. This makes factory configuration
|
||||||
* attributes available to the Log instance, if it so desires.
|
* attributes available to the Log instance, if it so desires.
|
||||||
* <p>
|
* <p>
|
||||||
* This factory will remember previously created <code>Log</code> instances
|
* This factory will remember previously created {@code Log} instances
|
||||||
* for the same name, and will return them on repeated requests to the
|
* for the same name, and will return them on repeated requests to the
|
||||||
* <code>getInstance()</code> method.
|
* {@code getInstance()} method.
|
||||||
*
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
@@ -97,7 +97,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
// ----------------------------------------------------- Manifest Constants
|
// ----------------------------------------------------- Manifest Constants
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>org.apache.commons.logging.Log</code>) of the system
|
* The name ({@code org.apache.commons.logging.Log}) of the system
|
||||||
* property identifying our {@link Log} implementation class.
|
* property identifying our {@link Log} implementation class.
|
||||||
*/
|
*/
|
||||||
public static final String LOG_PROPERTY = "org.apache.commons.logging.Log";
|
public static final String LOG_PROPERTY = "org.apache.commons.logging.Log";
|
||||||
@@ -109,7 +109,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
protected static final String LOG_PROPERTY_OLD = "org.apache.commons.logging.log";
|
protected static final String LOG_PROPERTY_OLD = "org.apache.commons.logging.log";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>org.apache.commons.logging.Log.allowFlawedContext</code>)
|
* The name ({@code org.apache.commons.logging.Log.allowFlawedContext})
|
||||||
* of the system property which can be set true/false to
|
* of the system property which can be set true/false to
|
||||||
* determine system behavior when a bad context-classloader is encountered.
|
* determine system behavior when a bad context-classloader is encountered.
|
||||||
* When set to false, a LogConfigurationException is thrown if
|
* When set to false, a LogConfigurationException is thrown if
|
||||||
@@ -124,7 +124,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
"org.apache.commons.logging.Log.allowFlawedContext";
|
"org.apache.commons.logging.Log.allowFlawedContext";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>org.apache.commons.logging.Log.allowFlawedDiscovery</code>)
|
* The name ({@code org.apache.commons.logging.Log.allowFlawedDiscovery})
|
||||||
* of the system property which can be set true/false to
|
* of the system property which can be set true/false to
|
||||||
* determine system behavior when a bad logging adapter class is
|
* determine system behavior when a bad logging adapter class is
|
||||||
* encountered during logging discovery. When set to false, an
|
* encountered during logging discovery. When set to false, an
|
||||||
@@ -140,7 +140,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
"org.apache.commons.logging.Log.allowFlawedDiscovery";
|
"org.apache.commons.logging.Log.allowFlawedDiscovery";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name (<code>org.apache.commons.logging.Log.allowFlawedHierarchy</code>)
|
* The name ({@code org.apache.commons.logging.Log.allowFlawedHierarchy})
|
||||||
* of the system property which can be set true/false to
|
* of the system property which can be set true/false to
|
||||||
* determine system behavior when a logging adapter class is
|
* determine system behavior when a logging adapter class is
|
||||||
* encountered which has bound to the wrong Log class implementation.
|
* encountered which has bound to the wrong Log class implementation.
|
||||||
@@ -203,7 +203,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
* The one-argument constructor of the
|
* The one-argument constructor of the
|
||||||
* {@link org.apache.commons.logging.Log}
|
* {@link org.apache.commons.logging.Log}
|
||||||
* implementation class that will be used to create new instances.
|
* implementation class that will be used to create new instances.
|
||||||
* This value is initialized by <code>getLogConstructor()</code>,
|
* This value is initialized by {@code getLogConstructor()},
|
||||||
* and then returned repeatedly.
|
* and then returned repeatedly.
|
||||||
*/
|
*/
|
||||||
protected Constructor logConstructor;
|
protected Constructor logConstructor;
|
||||||
@@ -214,13 +214,13 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
protected Class logConstructorSignature[] = { java.lang.String.class };
|
protected Class logConstructorSignature[] = { java.lang.String.class };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The one-argument <code>setLogFactory</code> method of the selected
|
* The one-argument {@code setLogFactory} method of the selected
|
||||||
* {@link org.apache.commons.logging.Log} method, if it exists.
|
* {@link org.apache.commons.logging.Log} method, if it exists.
|
||||||
*/
|
*/
|
||||||
protected Method logMethod;
|
protected Method logMethod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The signature of the <code>setLogFactory</code> method to be used.
|
* The signature of the {@code setLogFactory} method to be used.
|
||||||
*/
|
*/
|
||||||
protected Class logMethodSignature[] = { LogFactory.class };
|
protected Class logMethodSignature[] = { LogFactory.class };
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the configuration attribute with the specified name (if any),
|
* Return the configuration attribute with the specified name (if any),
|
||||||
* or <code>null</code> if there is no such attribute.
|
* or {@code null} if there is no such attribute.
|
||||||
*
|
*
|
||||||
* @param name Name of the attribute to return
|
* @param name Name of the attribute to return
|
||||||
*/
|
*/
|
||||||
@@ -264,11 +264,11 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method to derive a name from the specified class and
|
* Convenience method to derive a name from the specified class and
|
||||||
* call <code>getInstance(String)</code> with it.
|
* call {@code getInstance(String)} with it.
|
||||||
*
|
*
|
||||||
* @param clazz Class for which a suitable Log name will be derived
|
* @param clazz Class for which a suitable Log name will be derived
|
||||||
*
|
*
|
||||||
* @throws LogConfigurationException if a suitable <code>Log</code>
|
* @throws LogConfigurationException if a suitable {@code Log}
|
||||||
* instance cannot be returned
|
* instance cannot be returned
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -277,20 +277,20 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Construct (if necessary) and return a <code>Log</code> instance,
|
* <p>Construct (if necessary) and return a {@code Log} instance,
|
||||||
* using the factory's current set of configuration attributes.</p>
|
* using the factory's current set of configuration attributes.</p>
|
||||||
*
|
*
|
||||||
* <p><strong>NOTE</strong> - Depending upon the implementation of
|
* <p><strong>NOTE</strong> - Depending upon the implementation of
|
||||||
* the <code>LogFactory</code> you are using, the <code>Log</code>
|
* the {@code LogFactory} you are using, the {@code Log}
|
||||||
* instance you are returned may or may not be local to the current
|
* instance you are returned may or may not be local to the current
|
||||||
* application, and may or may not be returned again on a subsequent
|
* application, and may or may not be returned again on a subsequent
|
||||||
* call with the same name argument.</p>
|
* call with the same name argument.</p>
|
||||||
*
|
*
|
||||||
* @param name Logical name of the <code>Log</code> instance to be
|
* @param name Logical name of the {@code Log} instance to be
|
||||||
* returned (the meaning of this name is only known to the underlying
|
* returned (the meaning of this name is only known to the underlying
|
||||||
* logging implementation that is being wrapped)
|
* logging implementation that is being wrapped)
|
||||||
*
|
*
|
||||||
* @throws LogConfigurationException if a suitable <code>Log</code>
|
* @throws LogConfigurationException if a suitable {@code Log}
|
||||||
* instance cannot be returned
|
* instance cannot be returned
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -331,8 +331,8 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the configuration attribute with the specified name. Calling
|
* Set the configuration attribute with the specified name. Calling
|
||||||
* this with a <code>null</code> value is equivalent to calling
|
* this with a {@code null} value is equivalent to calling
|
||||||
* <code>removeAttribute(name)</code>.
|
* {@code removeAttribute(name)}.
|
||||||
* <p>
|
* <p>
|
||||||
* This method can be used to set logging configuration programmatically
|
* This method can be used to set logging configuration programmatically
|
||||||
* rather than via system properties. It can also be used in code running
|
* rather than via system properties. It can also be used in code running
|
||||||
@@ -350,7 +350,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
* automatically as an attribute here.
|
* automatically as an attribute here.
|
||||||
*
|
*
|
||||||
* @param name Name of the attribute to set
|
* @param name Name of the attribute to set
|
||||||
* @param value Value of the attribute to set, or <code>null</code>
|
* @param value Value of the attribute to set, or {@code null}
|
||||||
* to remove any setting for this attribute
|
* to remove any setting for this attribute
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -473,12 +473,12 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Return the <code>Constructor</code> that can be called to instantiate
|
* <p>Return the {@code Constructor} that can be called to instantiate
|
||||||
* new {@link org.apache.commons.logging.Log} instances.</p>
|
* new {@link org.apache.commons.logging.Log} instances.</p>
|
||||||
*
|
*
|
||||||
* <p><strong>IMPLEMENTATION NOTE</strong> - Race conditions caused by
|
* <p><strong>IMPLEMENTATION NOTE</strong> - Race conditions caused by
|
||||||
* calling this method from more than one thread are ignored, because
|
* calling this method from more than one thread are ignored, because
|
||||||
* the same <code>Constructor</code> instance will ultimately be derived
|
* the same {@code Constructor} instance will ultimately be derived
|
||||||
* in all circumstances.</p>
|
* in all circumstances.</p>
|
||||||
*
|
*
|
||||||
* @throws LogConfigurationException if a suitable constructor
|
* @throws LogConfigurationException if a suitable constructor
|
||||||
@@ -513,9 +513,9 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return <code>true</code> if <em>JDK 1.4 or later</em> logging
|
* Return {@code true} if <em>JDK 1.4 or later</em> logging
|
||||||
* is available. Also checks that the <code>Throwable</code> class
|
* is available. Also checks that the {@code Throwable} class
|
||||||
* supports <code>getStackTrace()</code>, which is required by
|
* supports {@code getStackTrace()}, which is required by
|
||||||
* Jdk14Logger.
|
* Jdk14Logger.
|
||||||
*
|
*
|
||||||
* @deprecated Never invoked by this class; subclasses should not assume
|
* @deprecated Never invoked by this class; subclasses should not assume
|
||||||
@@ -872,7 +872,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends message if the given name is similar to the candidate.
|
* Appends message if the given name is similar to the candidate.
|
||||||
* @param messageBuffer <code>StringBuffer</code> the message should be appended to,
|
* @param messageBuffer {@code StringBuffer} the message should be appended to,
|
||||||
* not null
|
* not null
|
||||||
* @param name the (trimmed) name to be test against the candidate, not null
|
* @param name the (trimmed) name to be test against the candidate, not null
|
||||||
* @param candidate the candidate name (not null)
|
* @param candidate the candidate name (not null)
|
||||||
@@ -900,7 +900,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
* a Log implementation specified by the user under the
|
* a Log implementation specified by the user under the
|
||||||
* property names {@link #LOG_PROPERTY} or {@link #LOG_PROPERTY_OLD}.
|
* property names {@link #LOG_PROPERTY} or {@link #LOG_PROPERTY_OLD}.
|
||||||
*
|
*
|
||||||
* @return classname specified by the user, or <code>null</code>
|
* @return classname specified by the user, or {@code null}
|
||||||
*/
|
*/
|
||||||
private String findUserSpecifiedLogClassName() {
|
private String findUserSpecifiedLogClassName() {
|
||||||
if (isDiagnosticsEnabled()) {
|
if (isDiagnosticsEnabled()) {
|
||||||
@@ -962,8 +962,8 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
*
|
*
|
||||||
* @param logAdapterClassName classname of the Log implementation
|
* @param logAdapterClassName classname of the Log implementation
|
||||||
* @param logCategory argument to pass to the Log implementation's constructor
|
* @param logCategory argument to pass to the Log implementation's constructor
|
||||||
* @param affectState <code>true</code> if this object's state should
|
* @param affectState {@code true} if this object's state should
|
||||||
* be affected by this method call, <code>false</code> otherwise.
|
* be affected by this method call, {@code false} otherwise.
|
||||||
* @return an instance of the given class, or null if the logging
|
* @return an instance of the given class, or null if the logging
|
||||||
* library associated with the specified adapter is not available.
|
* library associated with the specified adapter is not available.
|
||||||
* @throws LogConfigurationException if there was a serious error with
|
* @throws LogConfigurationException if there was a serious error with
|
||||||
@@ -1112,7 +1112,7 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
this.logClassName = logAdapterClassName;
|
this.logClassName = logAdapterClassName;
|
||||||
this.logConstructor = constructor;
|
this.logConstructor = constructor;
|
||||||
|
|
||||||
// Identify the <code>setLogFactory</code> method (if there is one)
|
// Identify the {@code setLogFactory} method (if there is one)
|
||||||
try {
|
try {
|
||||||
this.logMethod = logAdapterClass.getMethod("setLogFactory", logMethodSignature);
|
this.logMethod = logAdapterClass.getMethod("setLogFactory", logMethodSignature);
|
||||||
logDiagnostic("Found method setLogFactory(LogFactory) in '" + logAdapterClassName + "'");
|
logDiagnostic("Found method setLogFactory(LogFactory) in '" + logAdapterClassName + "'");
|
||||||
@@ -1254,11 +1254,11 @@ public class LogFactoryImpl extends LogFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates an internal diagnostic logging of the discovery failure and
|
* Generates an internal diagnostic logging of the discovery failure and
|
||||||
* then throws a <code>LogConfigurationException</code> that wraps
|
* then throws a {@code LogConfigurationException} that wraps
|
||||||
* the passed <code>Throwable</code>.
|
* the passed {@code Throwable}.
|
||||||
*
|
*
|
||||||
* @param logAdapterClassName is the class name of the Log implementation
|
* @param logAdapterClassName is the class name of the Log implementation
|
||||||
* that could not be instantiated. Cannot be <code>null</code>.
|
* that could not be instantiated. Cannot be {@code null}.
|
||||||
*
|
*
|
||||||
* @param classLoader is the classloader that we were trying to load the
|
* @param classLoader is the classloader that we were trying to load the
|
||||||
* logAdapterClassName from when the exception occurred.
|
* logAdapterClassName from when the exception occurred.
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ import org.apache.log.Hierarchy;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of <code>org.apache.commons.logging.Log</code>
|
* Implementation of {@code org.apache.commons.logging.Log}
|
||||||
* that wraps the <a href="http://avalon.apache.org/logkit/">avalon-logkit</a>
|
* 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.
|
* logging system. Configuration of {@code LogKit} is left to the user.
|
||||||
* <p>
|
* <p>
|
||||||
* <code>LogKit</code> accepts only <code>String</code> 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()</code> method before logging them.
|
* by called their {@code toString()} method before logging them.
|
||||||
*
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +40,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
|
|
||||||
// ------------------------------------------------------------- Attributes
|
// ------------------------------------------------------------- Attributes
|
||||||
|
|
||||||
/** Logging goes to this <code>LogKit</code> logger */
|
/** Logging goes to this {@code LogKit} logger */
|
||||||
protected transient volatile Logger logger;
|
protected transient volatile Logger logger;
|
||||||
|
|
||||||
/** Name of this logger */
|
/** Name of this logger */
|
||||||
@@ -49,7 +49,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
// ------------------------------------------------------------ Constructor
|
// ------------------------------------------------------------ Constructor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct <code>LogKitLogger</code> which wraps the <code>LogKit</code>
|
* Construct {@code LogKitLogger} which wraps the {@code LogKit}
|
||||||
* logger with given name.
|
* logger with given name.
|
||||||
*
|
*
|
||||||
* @param name log name
|
* @param name log name
|
||||||
@@ -80,7 +80,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
// ----------------------------------------------------- Log Implementation
|
// ----------------------------------------------------- Log Implementation
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.DEBUG</code>.
|
* Logs a message with {@code org.apache.log.Priority.DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#trace(Object)
|
* @see org.apache.commons.logging.Log#trace(Object)
|
||||||
@@ -91,7 +91,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.DEBUG</code>.
|
* Logs a message with {@code org.apache.log.Priority.DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -103,7 +103,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.DEBUG</code>.
|
* Logs a message with {@code org.apache.log.Priority.DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#debug(Object)
|
* @see org.apache.commons.logging.Log#debug(Object)
|
||||||
@@ -116,7 +116,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.DEBUG</code>.
|
* Logs a message with {@code org.apache.log.Priority.DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -130,7 +130,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.INFO</code>.
|
* Logs a message with {@code org.apache.log.Priority.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#info(Object)
|
* @see org.apache.commons.logging.Log#info(Object)
|
||||||
@@ -143,7 +143,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.INFO</code>.
|
* Logs a message with {@code org.apache.log.Priority.INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -157,7 +157,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.WARN</code>.
|
* Logs a message with {@code org.apache.log.Priority.WARN}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#warn(Object)
|
* @see org.apache.commons.logging.Log#warn(Object)
|
||||||
@@ -170,7 +170,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.WARN</code>.
|
* Logs a message with {@code org.apache.log.Priority.WARN}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -184,7 +184,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
|
* Logs a message with {@code org.apache.log.Priority.ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#error(Object)
|
* @see org.apache.commons.logging.Log#error(Object)
|
||||||
@@ -197,7 +197,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
|
* Logs a message with {@code org.apache.log.Priority.ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -211,7 +211,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.FATAL_ERROR</code>.
|
* Logs a message with {@code org.apache.log.Priority.FATAL_ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#fatal(Object)
|
* @see org.apache.commons.logging.Log#fatal(Object)
|
||||||
@@ -224,7 +224,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.log.Priority.FATAL_ERROR</code>.
|
* Logs a message with {@code org.apache.log.Priority.FATAL_ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -238,7 +238,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the <code>LogKit</code> logger will log messages of priority <code>DEBUG</code>.
|
* Checks whether the {@code LogKit} logger will log messages of priority {@code DEBUG}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isDebugEnabled() {
|
public boolean isDebugEnabled() {
|
||||||
@@ -246,7 +246,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the <code>LogKit</code> logger will log messages of priority <code>ERROR</code>.
|
* Checks whether the {@code LogKit} logger will log messages of priority {@code ERROR}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isErrorEnabled() {
|
public boolean isErrorEnabled() {
|
||||||
@@ -254,7 +254,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the <code>LogKit</code> logger will log messages of priority <code>FATAL_ERROR</code>.
|
* Checks whether the {@code LogKit} logger will log messages of priority {@code FATAL_ERROR}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isFatalEnabled() {
|
public boolean isFatalEnabled() {
|
||||||
@@ -262,7 +262,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the <code>LogKit</code> logger will log messages of priority <code>INFO</code>.
|
* Checks whether the {@code LogKit} logger will log messages of priority {@code INFO}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isInfoEnabled() {
|
public boolean isInfoEnabled() {
|
||||||
@@ -270,7 +270,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the <code>LogKit</code> logger will log messages of priority <code>DEBUG</code>.
|
* Checks whether the {@code LogKit} logger will log messages of priority {@code DEBUG}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isTraceEnabled() {
|
public boolean isTraceEnabled() {
|
||||||
@@ -278,7 +278,7 @@ public class LogKitLogger implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the <code>LogKit</code> logger will log messages of priority <code>WARN</code>.
|
* Checks whether the {@code LogKit} logger will log messages of priority {@code WARN}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isWarnEnabled() {
|
public boolean isWarnEnabled() {
|
||||||
|
|||||||
@@ -37,34 +37,34 @@ import org.apache.commons.logging.LogConfigurationException;
|
|||||||
* for all defined loggers, to System.err. The following system properties
|
* for all defined loggers, to System.err. The following system properties
|
||||||
* are supported to configure the behavior of this logger:
|
* are supported to configure the behavior of this logger:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li><code>org.apache.commons.logging.simplelog.defaultlog</code> -
|
* <li>{@code org.apache.commons.logging.simplelog.defaultlog} -
|
||||||
* Default logging detail level for all instances of SimpleLog.
|
* Default logging detail level for all instances of SimpleLog.
|
||||||
* Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
|
* Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
|
||||||
* If not specified, defaults to "info". </li>
|
* If not specified, defaults to "info". </li>
|
||||||
* <li><code>org.apache.commons.logging.simplelog.log.xxxxx</code> -
|
* <li>{@code org.apache.commons.logging.simplelog.log.xxxxx} -
|
||||||
* Logging detail level for a SimpleLog instance named "xxxxx".
|
* Logging detail level for a SimpleLog instance named "xxxxx".
|
||||||
* Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
|
* Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
|
||||||
* If not specified, the default logging detail level is used.</li>
|
* If not specified, the default logging detail level is used.</li>
|
||||||
* <li><code>org.apache.commons.logging.simplelog.showlogname</code> -
|
* <li>{@code org.apache.commons.logging.simplelog.showlogname} -
|
||||||
* Set to <code>true</code> if you want the Log instance name to be
|
* Set to {@code true} if you want the Log instance name to be
|
||||||
* included in output messages. Defaults to <code>false</code>.</li>
|
* included in output messages. Defaults to {@code false}.</li>
|
||||||
* <li><code>org.apache.commons.logging.simplelog.showShortLogname</code> -
|
* <li>{@code org.apache.commons.logging.simplelog.showShortLogname} -
|
||||||
* Set to <code>true</code> if you want the last component of the name to be
|
* Set to {@code true} if you want the last component of the name to be
|
||||||
* included in output messages. Defaults to <code>true</code>.</li>
|
* included in output messages. Defaults to {@code true}.</li>
|
||||||
* <li><code>org.apache.commons.logging.simplelog.showdatetime</code> -
|
* <li>{@code org.apache.commons.logging.simplelog.showdatetime} -
|
||||||
* Set to <code>true</code> if you want the current date and time
|
* Set to {@code true} if you want the current date and time
|
||||||
* to be included in output messages. Default is <code>false</code>.</li>
|
* to be included in output messages. Default is {@code false}.</li>
|
||||||
* <li><code>org.apache.commons.logging.simplelog.dateTimeFormat</code> -
|
* <li>{@code org.apache.commons.logging.simplelog.dateTimeFormat} -
|
||||||
* The date and time format to be used in the output messages.
|
* The date and time format to be used in the output messages.
|
||||||
* The pattern describing the date and time format is the same that is
|
* The pattern describing the date and time format is the same that is
|
||||||
* used in <code>java.text.SimpleDateFormat</code>. If the format is not
|
* used in {@code java.text.SimpleDateFormat}. If the format is not
|
||||||
* specified or is invalid, the default format is used.
|
* specified or is invalid, the default format is used.
|
||||||
* The default format is <code>yyyy/MM/dd HH:mm:ss:SSS zzz</code>.</li>
|
* The default format is {@code yyyy/MM/dd HH:mm:ss:SSS zzz}.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* In addition to looking for system properties with the names specified
|
* In addition to looking for system properties with the names specified
|
||||||
* above, this implementation also checks for a class loader resource named
|
* above, this implementation also checks for a class loader resource named
|
||||||
* <code>"simplelog.properties"</code>, and includes any matching definitions
|
* {@code "simplelog.properties"}, and includes any matching definitions
|
||||||
* from this resource (if it exists).
|
* from this resource (if it exists).
|
||||||
*
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
@@ -76,7 +76,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
|
|
||||||
// ------------------------------------------------------- Class Attributes
|
// ------------------------------------------------------- Class Attributes
|
||||||
|
|
||||||
/** All system properties used by <code>SimpleLog</code> start with this */
|
/** All system properties used by {@code SimpleLog} start with this */
|
||||||
static protected final String systemPrefix = "org.apache.commons.logging.simplelog.";
|
static protected final String systemPrefix = "org.apache.commons.logging.simplelog.";
|
||||||
|
|
||||||
/** Properties loaded from simplelog.properties */
|
/** Properties loaded from simplelog.properties */
|
||||||
@@ -269,7 +269,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Do the actual logging.
|
* Do the actual logging.
|
||||||
* <p>
|
* <p>
|
||||||
* This method assembles the message and then calls <code>write()</code>
|
* This method assembles the message and then calls {@code write()}
|
||||||
* to cause it to be written.
|
* to cause it to be written.
|
||||||
*
|
*
|
||||||
* @param type One of the LOG_LEVEL_XXX constants defining the log level
|
* @param type One of the LOG_LEVEL_XXX constants defining the log level
|
||||||
@@ -335,10 +335,10 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the content of the message accumulated in the specified
|
* Write the content of the message accumulated in the specified
|
||||||
* <code>StringBuffer</code> to the appropriate output destination. The
|
* {@code StringBuffer} to the appropriate output destination. The
|
||||||
* default implementation writes to <code>System.err</code>.
|
* default implementation writes to {@code System.err}.
|
||||||
*
|
*
|
||||||
* @param buffer A <code>StringBuffer</code> containing the accumulated
|
* @param buffer A {@code StringBuffer} containing the accumulated
|
||||||
* text to be logged
|
* text to be logged
|
||||||
*/
|
*/
|
||||||
protected void write(final StringBuffer buffer) {
|
protected void write(final StringBuffer buffer) {
|
||||||
@@ -360,7 +360,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with
|
* Logs a message with
|
||||||
* <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG</code>.
|
* {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#debug(Object)
|
* @see org.apache.commons.logging.Log#debug(Object)
|
||||||
@@ -374,7 +374,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with
|
* Logs a message with
|
||||||
* <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG</code>.
|
* {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -388,7 +388,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#trace(Object)
|
* @see org.apache.commons.logging.Log#trace(Object)
|
||||||
@@ -401,7 +401,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -415,7 +415,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#info(Object)
|
* @see org.apache.commons.logging.Log#info(Object)
|
||||||
@@ -428,7 +428,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -442,7 +442,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#warn(Object)
|
* @see org.apache.commons.logging.Log#warn(Object)
|
||||||
@@ -455,7 +455,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -469,7 +469,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#error(Object)
|
* @see org.apache.commons.logging.Log#error(Object)
|
||||||
@@ -482,7 +482,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -496,7 +496,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL</code>.
|
* Log a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @see org.apache.commons.logging.Log#fatal(Object)
|
* @see org.apache.commons.logging.Log#fatal(Object)
|
||||||
@@ -509,7 +509,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL</code>.
|
* Logs a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL}.
|
||||||
*
|
*
|
||||||
* @param message to log
|
* @param message to log
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
@@ -525,7 +525,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Are debug messages currently enabled?
|
* Are debug messages currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* This allows expensive operations such as <code>String</code>
|
* This allows expensive operations such as {@code String}
|
||||||
* concatenation to be avoided when the message will be ignored by the
|
* concatenation to be avoided when the message will be ignored by the
|
||||||
* logger.
|
* logger.
|
||||||
*/
|
*/
|
||||||
@@ -537,7 +537,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Are error messages currently enabled?
|
* Are error messages currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* This allows expensive operations such as <code>String</code>
|
* This allows expensive operations such as {@code String}
|
||||||
* concatenation to be avoided when the message will be ignored by the
|
* concatenation to be avoided when the message will be ignored by the
|
||||||
* logger.
|
* logger.
|
||||||
*/
|
*/
|
||||||
@@ -549,7 +549,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Are fatal messages currently enabled?
|
* Are fatal messages currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* This allows expensive operations such as <code>String</code>
|
* This allows expensive operations such as {@code String}
|
||||||
* concatenation to be avoided when the message will be ignored by the
|
* concatenation to be avoided when the message will be ignored by the
|
||||||
* logger.
|
* logger.
|
||||||
*/
|
*/
|
||||||
@@ -561,7 +561,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Are info messages currently enabled?
|
* Are info messages currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* This allows expensive operations such as <code>String</code>
|
* This allows expensive operations such as {@code String}
|
||||||
* concatenation to be avoided when the message will be ignored by the
|
* concatenation to be avoided when the message will be ignored by the
|
||||||
* logger.
|
* logger.
|
||||||
*/
|
*/
|
||||||
@@ -573,7 +573,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Are trace messages currently enabled?
|
* Are trace messages currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* This allows expensive operations such as <code>String</code>
|
* This allows expensive operations such as {@code String}
|
||||||
* concatenation to be avoided when the message will be ignored by the
|
* concatenation to be avoided when the message will be ignored by the
|
||||||
* logger.
|
* logger.
|
||||||
*/
|
*/
|
||||||
@@ -585,7 +585,7 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Are warn messages currently enabled?
|
* Are warn messages currently enabled?
|
||||||
* <p>
|
* <p>
|
||||||
* This allows expensive operations such as <code>String</code>
|
* This allows expensive operations such as {@code String}
|
||||||
* concatenation to be avoided when the message will be ignored by the
|
* concatenation to be avoided when the message will be ignored by the
|
||||||
* logger.
|
* logger.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,37 +29,37 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of <code>Hashtable</code> that uses <code>WeakReference</code>'s
|
* Implementation of {@code Hashtable} that uses {@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</code> 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>
|
||||||
* <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.
|
||||||
* This implementation is also tuned towards a particular purpose: for use as a replacement
|
* This implementation is also tuned towards a particular purpose: for use as a replacement
|
||||||
* for <code>Hashtable</code> in <code>LogFactory</code>. This application requires
|
* for {@code Hashtable} in {@code LogFactory}. This application requires
|
||||||
* good liveliness for <code>get</code> and <code>put</code>. 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>
|
||||||
* <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</code> used in <code>LogFactory</code> 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 classloaders to be collected by the garbage collector without the need
|
* allow classloaders 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>
|
||||||
* <code>org.apache.commons.logging.LogFactory</code> 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
|
||||||
* references to the <code>LogFactory</code> implementation it loads
|
* references to the {@code LogFactory} implementation it loads
|
||||||
* (rather than using a standard Hashtable instance).
|
* (rather than using a standard Hashtable instance).
|
||||||
* Having this class used instead of <code>Hashtable</code> solves
|
* Having this class used instead of {@code Hashtable} solves
|
||||||
* certain issues related to dynamic reloading of applications in J2EE-style
|
* certain issues related to dynamic reloading of applications in J2EE-style
|
||||||
* environments. However this class requires java 1.3 or later (due to its use
|
* environments. However this class requires java 1.3 or later (due to its use
|
||||||
* of <code>java.lang.ref.WeakReference</code> and associates).
|
* of {@code java.lang.ref.WeakReference} and associates).
|
||||||
* And by the way, this extends <code>Hashtable</code> rather than <code>HashMap</code>
|
* 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</code> for more details.
|
* for method {@code LogFactory.createFactoryStore} for more details.
|
||||||
* <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.
|
||||||
@@ -71,7 +71,7 @@ import java.util.Set;
|
|||||||
* sets the component's classloader to null with the intent that all the
|
* sets the component's classloader to null with the intent that all the
|
||||||
* component's classes get garbage-collected. However there's still a
|
* component's classes get garbage-collected. However there's still a
|
||||||
* reference to the component's classloader from a key in the "global"
|
* reference to the component's classloader from a key in the "global"
|
||||||
* <code>LogFactory</code>'s factories member! If <code>LogFactory.release()</code>
|
* {@code LogFactory}'s factories member! If {@code LogFactory.release()}
|
||||||
* is called whenever component is unloaded, the classloaders will be correctly
|
* is called whenever component is unloaded, the classloaders will be correctly
|
||||||
* garbage collected; this <i>should</i> be done by any container that
|
* garbage collected; this <i>should</i> be done by any container that
|
||||||
* bundles commons-logging by default. However, holding the classloader
|
* bundles commons-logging by default. However, holding the classloader
|
||||||
@@ -83,24 +83,24 @@ import java.util.Set;
|
|||||||
* 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>
|
||||||
* If the abstract class <code>LogFactory</code> is
|
* If the abstract class {@code LogFactory} is
|
||||||
* loaded by the container classloader but a subclass of
|
* loaded by the container classloader but a subclass of
|
||||||
* <code>LogFactory</code> [LogFactory1] is loaded by the component's
|
* {@code LogFactory} [LogFactory1] is loaded by the component's
|
||||||
* classloader and an instance stored in the static map associated with the
|
* classloader and an instance stored in the static map associated with the
|
||||||
* base LogFactory class, then there is a strong reference from the LogFactory
|
* base LogFactory class, then there is a strong reference from the LogFactory
|
||||||
* class to the LogFactory1 instance (as normal) and a strong reference from
|
* class to the LogFactory1 instance (as normal) and a strong reference from
|
||||||
* the LogFactory1 instance to the component classloader via
|
* the LogFactory1 instance to the component classloader via
|
||||||
* <code>getClass().getClassLoader()</code>. This chain of references will prevent
|
* {@code getClass().getClassLoader()}. This chain of references will prevent
|
||||||
* collection of the child classloader.
|
* collection of the child classloader.
|
||||||
* <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 classloader (e.g. a server level classloader in a
|
* loaded by a parent classloader (e.g. a server level classloader in a
|
||||||
* servlet container) and a custom <code>LogFactory</code> implementation is
|
* servlet container) and a custom {@code LogFactory} implementation is
|
||||||
* loaded by a child classloader (e.g. a web app classloader).
|
* loaded by a child classloader (e.g. a web app classloader).
|
||||||
* <p>
|
* <p>
|
||||||
* To avoid this scenario, ensure
|
* To avoid this scenario, ensure
|
||||||
* that any custom LogFactory subclass is loaded by the same classloader as
|
* that any custom LogFactory subclass is loaded by the same classloader as
|
||||||
* the base <code>LogFactory</code>. 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.
|
||||||
*
|
*
|
||||||
@@ -420,7 +420,7 @@ public final class WeakHashtable extends Hashtable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @throws NullPointerException if referant is <code>null</code>
|
* @throws NullPointerException if referant is {@code null}
|
||||||
*/
|
*/
|
||||||
private Referenced(final Object referant) {
|
private Referenced(final Object referant) {
|
||||||
reference = new WeakReference(referant);
|
reference = new WeakReference(referant);
|
||||||
@@ -431,7 +431,7 @@ public final class WeakHashtable extends Hashtable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @throws NullPointerException if key is <code>null</code>
|
* @throws NullPointerException if key is {@code null}
|
||||||
*/
|
*/
|
||||||
private Referenced(final Object key, final ReferenceQueue queue) {
|
private Referenced(final Object key, final ReferenceQueue queue) {
|
||||||
reference = new WeakKey(key, queue, this);
|
reference = new WeakKey(key, queue, this);
|
||||||
@@ -483,7 +483,7 @@ public final class WeakHashtable extends Hashtable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* WeakReference subclass that holds a hard reference to an
|
* WeakReference subclass that holds a hard reference to an
|
||||||
* associated <code>value</code> and also makes accessible
|
* associated {@code value} and also makes accessible
|
||||||
* the Referenced object holding it.
|
* the Referenced object holding it.
|
||||||
*/
|
*/
|
||||||
private final static class WeakKey extends WeakReference {
|
private final static class WeakKey extends WeakReference {
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ public class PathableClassLoader extends URLClassLoader {
|
|||||||
* The classpath of the classloader for this instance is scanned, and any
|
* The classpath of the classloader for this instance is scanned, and any
|
||||||
* jarfile in the path whose name starts with the logicalLib string is
|
* jarfile in the path whose name starts with the logicalLib string is
|
||||||
* considered a match. For example, passing "foo" will match a url
|
* considered a match. For example, passing "foo" will match a url
|
||||||
* of <code>file:///some/where/foo-2.7.jar</code>.
|
* of {@code file:///some/where/foo-2.7.jar}.
|
||||||
* <p>
|
* <p>
|
||||||
* When multiple classpath entries match the specified logicalLib string,
|
* When multiple classpath entries match the specified logicalLib string,
|
||||||
* the one with the shortest filename component is returned. This means that
|
* the one with the shortest filename component is returned. This means that
|
||||||
@@ -384,8 +384,8 @@ public class PathableClassLoader extends URLClassLoader {
|
|||||||
*
|
*
|
||||||
* Clean implementation of list function of
|
* Clean implementation of list function of
|
||||||
* {@link java.util.Collection} added in JDK 1.4
|
* {@link java.util.Collection} added in JDK 1.4
|
||||||
* @param en <code>Enumeration</code>, possibly null
|
* @param en {@code Enumeration}, possibly null
|
||||||
* @return <code>ArrayList</code> containing the enumerated
|
* @return {@code ArrayList} containing the enumerated
|
||||||
* elements in the enumerated order, not null
|
* elements in the enumerated order, not null
|
||||||
*/
|
*/
|
||||||
private ArrayList toList(final Enumeration en) {
|
private ArrayList toList(final Enumeration en) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import org.apache.commons.logging.PathableTestSuite;
|
|||||||
* The result should be that the third file is used.
|
* The result should be that the third file is used.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that parentFirst=true is used in this test because method
|
* Note that parentFirst=true is used in this test because method
|
||||||
* <code>PathableClassLoader.getResources</code> always behaves as if
|
* {@code PathableClassLoader.getResources} always behaves as if
|
||||||
* parentFirst=true; see the PathableClassLoader javadoc for details.
|
* parentFirst=true; see the PathableClassLoader javadoc for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -65,25 +65,25 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The customized <code>Handler</code> we will be using.</p>
|
* <p>The customized {@code Handler} we will be using.</p>
|
||||||
*/
|
*/
|
||||||
protected TestHandler handler = null;
|
protected TestHandler handler = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The underlying <code>Handler</code>s we will be using.</p>
|
* <p>The underlying {@code Handler}s we will be using.</p>
|
||||||
*/
|
*/
|
||||||
protected Handler handlers[] = null;
|
protected Handler handlers[] = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The underlying <code>Logger</code> we will be using.</p>
|
* <p>The underlying {@code Logger} we will be using.</p>
|
||||||
*/
|
*/
|
||||||
protected Logger logger = null;
|
protected Logger logger = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The underlying <code>LogManager</code> we will be using.</p>
|
* <p>The underlying {@code LogManager} we will be using.</p>
|
||||||
*/
|
*/
|
||||||
protected LogManager manager = null;
|
protected LogManager manager = null;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import java.util.logging.LogRecord;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Test implementation of <code>java.util.logging.Handler</code>.</p>
|
* <p>Test implementation of {@code java.util.logging.Handler}.</p>
|
||||||
*
|
*
|
||||||
* @author Craig R. McClanahan
|
* @author Craig R. McClanahan
|
||||||
* @version $Revision$ $Date$
|
* @version $Revision$ $Date$
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import org.apache.log4j.AppenderSkeleton;
|
|||||||
import org.apache.log4j.spi.LoggingEvent;
|
import org.apache.log4j.spi.LoggingEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A custom implementation of <code>org.apache.log4j.Appender</code> which
|
* A custom implementation of {@code org.apache.log4j.Appender} which
|
||||||
* converts the log4j-specific log event record into a representation that
|
* converts the log4j-specific log event record into a representation that
|
||||||
* doesn't have a dependency on log4j and stores that new representation into
|
* doesn't have a dependency on log4j and stores that new representation into
|
||||||
* an external list.
|
* an external list.
|
||||||
|
|||||||
Reference in New Issue
Block a user