Spelling and version 1.3.0
This commit is contained in:
@@ -51,7 +51,7 @@ implementations.
|
||||
The package should :
|
||||
<ul>
|
||||
<li>Have an API which should be as simple to use as possible</li>
|
||||
<li>Provide support for log4j</li>
|
||||
<li>Provide support for Log4j</li>
|
||||
<li>Provide pluggable support for other logging APIs</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -108,10 +108,10 @@ Binary and source distributions are available
|
||||
have been encountered when using commons-logging in servlet containers or j2ee
|
||||
containers where complex classpaths are present and multiple copies of
|
||||
commons-logging libraries are present at different levels.</p>
|
||||
<p>This release also adds support for the TRACE level added to log4j in the
|
||||
<p>This release also adds support for the TRACE level added to Log4j in the
|
||||
1.2.12 release. In former commons-logging versions, the log.trace method
|
||||
caused log4j to output the message at the DEBUG level (the lowest level
|
||||
supported by log4j at that time).</p>
|
||||
caused Log4j to output the message at the DEBUG level (the lowest level
|
||||
supported by Log4j at that time).</p>
|
||||
<p>For the full details, see the release notes for this version.</p>
|
||||
</subsection>
|
||||
<subsection name='1.0.5 Release (Alpha)'>
|
||||
|
||||
@@ -53,7 +53,7 @@ implementations.
|
||||
The package should :
|
||||
<ul>
|
||||
<li>Have an API which should be as simple to use as possible</li>
|
||||
<li>Provide support for log4j</li>
|
||||
<li>Provide support for Log4j</li>
|
||||
<li>Provide pluggable support for other logging APIs</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
@@ -426,7 +426,7 @@ implementation.
|
||||
Because the commons-logging-api.jar in the container does not contain any
|
||||
log-library-adapter classes, updated behavior for these <i>will</i> be
|
||||
seen when logging 1.1 is bundled in WEB-INF/lib. In particular, the
|
||||
support for log4j's TRACE level will take effect without having to update
|
||||
support for Log4j's TRACE level will take effect without having to update
|
||||
the container.
|
||||
</p>
|
||||
<p>
|
||||
@@ -437,7 +437,7 @@ implementation.
|
||||
can only see their matching concrete logging library if that library is
|
||||
available in the same classpath. Bundling the full commons-logging jarfile
|
||||
(with adapters) into the system classpath therefore means that logging
|
||||
libraries (eg log4j) within WEB-INF/lib are not accessible.
|
||||
libraries (eg Log4j) within WEB-INF/lib are not accessible.
|
||||
</p>
|
||||
<p>
|
||||
Note that the behavior described here only applies if the standard Tomcat
|
||||
|
||||
@@ -125,7 +125,7 @@ public abstract class StandardTests extends TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify log4j's setup so that all messages actually logged get redirected
|
||||
* Modify Log4j's setup so that all messages actually logged get redirected
|
||||
* into the specified list.
|
||||
* <p>
|
||||
* This method also sets the logging level to INFO so that we
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* A concrete class that runs the standard tests, and is compiled
|
||||
* specifically against log4j12. The parent class can't call any
|
||||
* log4j methods at all as that would mean it has to be compiled
|
||||
* specifically against Log4j 1.2. The parent class can't call any
|
||||
* Log4j methods at all as that would mean it has to be compiled
|
||||
* against a particular version of log4j.
|
||||
*/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.apache.log4j.spi.LoggingEvent;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* an external list.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user