Spelling and version 1.3.0
This commit is contained in:
@@ -111,7 +111,7 @@ public abstract class LogFactory {
|
||||
public static final String FACTORY_PROPERTIES = "commons-logging.properties";
|
||||
|
||||
/**
|
||||
* JDK1.3+ <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">
|
||||
* JDK 1.3+ <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">
|
||||
* 'Service Provider' specification</a>.
|
||||
*/
|
||||
protected static final String SERVICE_ID =
|
||||
@@ -841,7 +841,7 @@ public abstract class LogFactory {
|
||||
throw e;
|
||||
}
|
||||
|
||||
// Second, try to find a service by using the JDK1.3 class
|
||||
// Second, try to find a service by using the JDK 1.3 class
|
||||
// discovery mechanism, which involves putting a file with the name
|
||||
// of an interface class in the META-INF/services directory, where the
|
||||
// contents of the file is a single line specifying a concrete class
|
||||
|
||||
@@ -58,7 +58,7 @@ public class LogSource {
|
||||
*/
|
||||
static protected Hashtable<String, Log> logs = new Hashtable<>();
|
||||
|
||||
/** Is log4j available (in the current classpath) */
|
||||
/** Is Log4j available (in the current classpath) */
|
||||
static protected boolean log4jIsAvailable;
|
||||
|
||||
/** Is JDK 1.4 logging available */
|
||||
@@ -171,7 +171,7 @@ public class LogSource {
|
||||
* (containing the <i>name</i> of the {@link Log} to be constructed.
|
||||
* <p>
|
||||
* When {@code org.apache.commons.logging.log} is not set, or when no corresponding
|
||||
* class can be found, this method will return a Log4JLogger if the log4j Logger
|
||||
* class can be found, this method will return a Log4JLogger if the Log4j Logger
|
||||
* class is available in the {@link LogSource}'s classpath, or a Jdk14Logger if we
|
||||
* are on a JDK 1.4 or later system, or NoOpLog if neither of the above conditions is true.
|
||||
*
|
||||
|
||||
@@ -31,15 +31,15 @@ import org.apache.log4j.Priority;
|
||||
* Initial configuration of the corresponding Logger instances should be done
|
||||
* in the usual manner, as outlined in the Log4J documentation.
|
||||
* <p>
|
||||
* The reason this logger is distinct from the 1.3 logger is that in version 1.2
|
||||
* The reason this logger is distinct from the 1.3.0 logger is that in version 1.2
|
||||
* of Log4J:
|
||||
* <ul>
|
||||
* <li>class Logger takes Priority parameters not Level parameters.
|
||||
* <li>class Level extends Priority
|
||||
* </ul>
|
||||
* Log4J1.3 is expected to change Level so it no longer extends Priority, which is
|
||||
* Log4j 1.3 is expected to change Level so it no longer extends Priority, which is
|
||||
* a non-binary-compatible change. The class generated by compiling this code against
|
||||
* log4j 1.2 will therefore not run against log4j 1.3.
|
||||
* Log4j 1.2 will therefore not run against Log4j 1.3.
|
||||
*
|
||||
* @deprecated Scheduled for removal since version 1.x of Log4j has reached end-of-life.
|
||||
*/
|
||||
@@ -59,18 +59,18 @@ public class Log4JLogger implements Log, Serializable {
|
||||
// otherwise initializer expressions associated with those variables
|
||||
// will override any settings done here.
|
||||
//
|
||||
// Verify that log4j is available, and that it is version 1.2.
|
||||
// Verify that Log4j is available, and that it is version 1.2.
|
||||
// If an ExceptionInInitializerError is generated, then LogFactoryImpl
|
||||
// will treat that as meaning that the appropriate underlying logging
|
||||
// library is just not present - if discovery is in progress then
|
||||
// discovery will continue.
|
||||
static {
|
||||
if (!Priority.class.isAssignableFrom(Level.class)) {
|
||||
// nope, this is log4j 1.3, so force an ExceptionInInitializerError
|
||||
// nope, this is Log4j 1.3, so force an ExceptionInInitializerError
|
||||
throw new InstantiationError("Log4J 1.2 not available");
|
||||
}
|
||||
|
||||
// Releases of log4j1.2 >= 1.2.12 have Priority.TRACE available, earlier
|
||||
// Releases of Log4j 1.2 >= 1.2.12 have Priority.TRACE available, earlier
|
||||
// versions do not. If TRACE is not available, then we have to map
|
||||
// calls to Log.trace(...) onto the DEBUG level.
|
||||
|
||||
@@ -98,14 +98,14 @@ public class Log4JLogger implements Log, Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* For use with a log4j factory.
|
||||
* For use with a Log4j factory.
|
||||
*
|
||||
* @param logger Logger.
|
||||
*/
|
||||
public Log4JLogger(final Logger logger) {
|
||||
if (logger == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"Warning - null logger in constructor; possible log4j misconfiguration.");
|
||||
"Warning - null logger in constructor; possible Log4j misconfiguration.");
|
||||
}
|
||||
this.name = logger.getName();
|
||||
this.logger = logger;
|
||||
@@ -265,7 +265,7 @@ public class Log4JLogger implements Log, Serializable {
|
||||
|
||||
/**
|
||||
* Tests 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} is enabled or not.
|
||||
*/
|
||||
@Override
|
||||
@@ -283,7 +283,7 @@ public class Log4JLogger implements Log, Serializable {
|
||||
|
||||
/**
|
||||
* Logs a message with {@code org.apache.log4j.Priority.TRACE}.
|
||||
* When using a log4j version that does not support the {@code TRACE}
|
||||
* When using a Log4j version that does not support the {@code TRACE}
|
||||
* level, the message will be logged at the {@code DEBUG} level.
|
||||
*
|
||||
* @param message to log
|
||||
@@ -296,7 +296,7 @@ public class Log4JLogger implements Log, Serializable {
|
||||
|
||||
/**
|
||||
* Logs a message with {@code org.apache.log4j.Priority.TRACE}.
|
||||
* When using a log4j version that does not support the {@code TRACE}
|
||||
* When using a Log4j version that does not support the {@code TRACE}
|
||||
* level, the message will be logged at the {@code DEBUG} level.
|
||||
*
|
||||
* @param message to log
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.apache.logging.log4j.util.StackLocatorUtil;
|
||||
* Based on the `log4j-jcl` artifact from Apache Logging Services.
|
||||
* </p>
|
||||
*
|
||||
* @since 1.3
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public final class Log4jApiLogFactory extends LogFactory {
|
||||
|
||||
|
||||
@@ -548,13 +548,13 @@ public class LogFactoryImpl extends LogFactory {
|
||||
// see if it works
|
||||
//
|
||||
// The latter certainly has advantages for user-installable logging
|
||||
// libraries such as log4j; in a webapp for example this code should
|
||||
// libraries such as Log4j; in a webapp for example this code should
|
||||
// first check whether the user has provided any of the possible
|
||||
// logging libraries before looking in the parent class loader.
|
||||
// Unfortunately, however, Jdk14Logger will always work in jvm>=1.4,
|
||||
// and SimpleLog will always work in any JVM. So the loop would never
|
||||
// ever look for logging libraries in the parent classpath. Yet many
|
||||
// users would expect that putting log4j there would cause it to be
|
||||
// users would expect that putting Log4j there would cause it to be
|
||||
// detected (and this is the historical JCL behavior). So we go with
|
||||
// the first approach. A user that has bundled a specific logging lib
|
||||
// in a webapp should use a commons-logging.properties file or a
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.slf4j.spi.LocationAwareLogger;
|
||||
/**
|
||||
* Logger factory hardcoded to send everything to SLF4J.
|
||||
*
|
||||
* @since 1.3
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public final class Slf4jLogFactory extends LogFactory {
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ import java.util.Set;
|
||||
* (rather than using a standard Hashtable instance).
|
||||
* Having this class used instead of {@code Hashtable} solves
|
||||
* 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} and associates).
|
||||
* And by the way, this extends {@code Hashtable} rather than {@code HashMap}
|
||||
* for backwards compatibility reasons. See the documentation
|
||||
|
||||
Reference in New Issue
Block a user