mirror of https://github.com/qos-ch/slf4j
Fix typos.
This commit is contained in:
parent
a598b1780c
commit
4b710c8238
|
|
@ -25,13 +25,13 @@
|
|||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- declaration to cimcumvent http://jira.codehaus.org/browse/MANTRUN-95 -->
|
||||
<!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<!-- declaration to cimcumvent http://jira.codehaus.org/browse/MANTRUN-95 -->
|
||||
<!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 -->
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant-junit</artifactId>
|
||||
|
|
|
|||
2
jcl-over-slf4j/src/main/java/org/apache/commons/logging/package.html
Normal file → Executable file
2
jcl-over-slf4j/src/main/java/org/apache/commons/logging/package.html
Normal file → Executable file
|
|
@ -67,7 +67,7 @@ convention) after the calling class:
|
|||
|
||||
<p>In this version of JCL, the selection of the logging system to use
|
||||
is chosen by the underlying SLF4J API. Consequently, all JCL-specific
|
||||
configration parameters are ignored.
|
||||
configuration parameters are ignored.
|
||||
</p>
|
||||
|
||||
<h4>Choosing a <code>LogFactory</code> Implementation</h4>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<body>
|
||||
Tests related to the org.slfj.ext package. However, location information code
|
||||
Tests related to the org.slf4j.ext package. However, location information code
|
||||
required the caller class (XLogger) to have a different prefix than
|
||||
the test class XLoggerTest. This is ensured by having the test class
|
||||
placed in a different package.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ General limitations
|
|||
very few log statements bearing the FATAL level.
|
||||
|
||||
|
||||
- if a method declares multipe loggers on the same line, the conversion will not be complete. Example:
|
||||
- if a method declares multiple loggers on the same line, the conversion will not be complete. Example:
|
||||
|
||||
|
||||
public void someMethod(Log l1, Log l2) {
|
||||
|
|
@ -32,4 +32,3 @@ When migrating from log4j
|
|||
|
||||
- Calls to PropertyConfigurator or DomConfigurator cannot be migrated since
|
||||
SLF4J the equivalents.
|
||||
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
</ul>
|
||||
<h2>Reporting with Bugzilla</h2>
|
||||
|
||||
<p>Onlly after you have exhausted the aforementioned steps, should
|
||||
<p>Only after you have exhausted the aforementioned steps, should
|
||||
you file a formal report in bugzilla.
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
[suchAndSuch] is not supported in jcl-over-slf4j.
|
||||
</h3>
|
||||
|
||||
<p>An <code>UnsuportedOperationException</code> is thrown whenever
|
||||
<p>An <code>UnsupportedOperationException</code> is thrown whenever
|
||||
one of the protected methods introduced in JCL 1.1 are
|
||||
invoked. These methods are invoked by <code>LogFactory</code>
|
||||
implementations shipping with
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
|
||||
... </p>
|
||||
|
||||
<p>The error is caused by the static initilizer of the
|
||||
<p>The error is caused by the static initializer of the
|
||||
<code>LoggerFactory</code> class attempting to directly access the
|
||||
SINGLETON field of
|
||||
<code>org.slf4j.impl.StaticLoggerBinder</code>. While this was
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
</h3>
|
||||
|
||||
|
||||
<p>SLF4J API is desinged to bind with one and only one underlying
|
||||
<p>SLF4J API is designed to bind with one and only one underlying
|
||||
logging framework at a time. If more than one binding is present
|
||||
on the class path, SLF4J will emit a warning, listing the location
|
||||
of those bindings.</p>
|
||||
|
|
@ -441,4 +441,3 @@
|
|||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ prefix='';
|
|||
|
||||
<p>The <code>SubstituteLoggerFactory</code> class is used internally
|
||||
by the LoggerFactory class. Changes to the constructor of
|
||||
SubstituteLoggerFactory should have stricly no affect on users.
|
||||
SubstituteLoggerFactory should have strictly no effect on users.
|
||||
</p>
|
||||
|
||||
<h2><a href="#1_5_5" name="1_5_4">Version 1.5.5 compared to 1.5.4</a></h2>
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ dt:hover .anchor {
|
|||
}
|
||||
|
||||
|
||||
/* ------------ twitter botton ------- */
|
||||
/* ------------ twitter button ------- */
|
||||
.twitter_button {
|
||||
vertical-align: text-bottom;
|
||||
padding-top: 3px;
|
||||
|
|
|
|||
|
|
@ -162,11 +162,11 @@
|
|||
8 static String NESTED_PROFILER_NAME = "SORT_AND_PRUNE";
|
||||
9
|
||||
10 final int[] originalArray;
|
||||
11 final int originalArrrayLength;
|
||||
11 final int originalArrayLength;
|
||||
12
|
||||
13 public SortAndPruneComposites(int[] randomArray) {
|
||||
14 this.originalArray = randomArray;
|
||||
15 this.originalArrrayLength = randomArray.length;
|
||||
15 this.originalArrayLength = randomArray.length;
|
||||
16
|
||||
17 }
|
||||
18
|
||||
|
|
@ -343,7 +343,7 @@
|
|||
<li>aid in problem diagnosis in production where no debugging is
|
||||
possible</li>
|
||||
|
||||
<li>help educate new deveopers in learning the application.</li>
|
||||
<li>help educate new developers in learning the application.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
|
||||
<p>The throwing() method can be used by an application when it is
|
||||
throwing an exception that is unlikely to be handled, such as a
|
||||
RuntimeExcpetion. This will insure that proper diagnostics are
|
||||
RuntimeException. This will insure that proper diagnostics are
|
||||
available if needed. The logging event generated will have a level
|
||||
of ERROR and will have an associated Marker with a name of
|
||||
"THROWING" which is also an "EXCEPTION" Marker.
|
||||
|
|
@ -394,7 +394,7 @@
|
|||
utility class.</p>
|
||||
|
||||
<p>The following example shows a simple application using these
|
||||
methods in a fairly typcial manner. The <code>throwing()</code>
|
||||
methods in a fairly typical manner. The <code>throwing()</code>
|
||||
method is not present since no Exceptions are explicitly thrown and
|
||||
not handled.
|
||||
</p>
|
||||
|
|
@ -585,14 +585,14 @@ java.lang.ArrayIndexOutOfBoundsException: 3
|
|||
|
||||
<h2><a name="event_logger"></a>Event Logging</h2>
|
||||
|
||||
<p>The EventLogger class provides a simple mechansim for logging events that occur in an application.
|
||||
<p>The EventLogger class provides a simple mechanism for logging events that occur in an application.
|
||||
While the EventLogger is useful as a way of initiating events that should be processed by an audit
|
||||
Logging system, it does not implement any of the features an audit logging system would require
|
||||
such as guaranteed delivery.</p>
|
||||
|
||||
<p>The recommended way of using the EventLogger in a typical web application is to populate
|
||||
the SLF4J MDC with data that is related to the entire lifespan of the request such as the user's id,
|
||||
the user's ip address, the product name, etc. This can easily be done in a servlet fileter where
|
||||
the user's ip address, the product name, etc. This can easily be done in a servlet filter where
|
||||
the MDC can also be cleared at the end of the request. When an event that needs to be recorded
|
||||
occurs an EventData object should be created and populated. Then call EventLogger.logEvent(data)
|
||||
where data is a reference to the EventData object.</p>
|
||||
|
|
@ -695,7 +695,7 @@ public class MyApp {
|
|||
} </pre>
|
||||
|
||||
<p>The EventLogger class uses a Logger named "EventLogger". EventLogger uses a logging level
|
||||
of INFO. The following shows a configuraton using Logback.</p>
|
||||
of INFO. The following shows a configuration using Logback.</p>
|
||||
<pre class="prettyprint source"><configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<layout class="ch.qos.logback.classic.PatternLayout">
|
||||
|
|
@ -867,7 +867,7 @@ Hello World
|
|||
printed, may be silently swallowed by the JVM.</li>
|
||||
<li>The javaagent only logs to System.err.</li>
|
||||
<li>The name of the logger variable is fixed (to a value unlikely to be used) so if that
|
||||
name is already used, a failure occures. This should be changed to determine
|
||||
name is already used, a failure occurs. This should be changed to determine
|
||||
an unused name and use that instead.</li>
|
||||
<li>Empty methods are not instrumented (an incorrect check for an interface). They should be</li>
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@
|
|||
<code>LoggerFactory</code>? </a></li>
|
||||
|
||||
<li><a href="#paramException">In the presence of an
|
||||
exception/throwable, is it possible to parametizere a logging
|
||||
exception/throwable, is it possible to parameterize a logging
|
||||
statement?</a></li>
|
||||
|
||||
</ol>
|
||||
|
|
@ -394,7 +394,7 @@
|
|||
org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
||||
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)</pre>
|
||||
|
||||
<p>This error is caused by the static initilizer of the
|
||||
<p>This error is caused by the static initializer of the
|
||||
<code>LoggerFactory</code> class attempting to directly access
|
||||
the SINGLETON field of
|
||||
<code>org.slf4j.impl.StaticLoggerBinder</code>. While this was
|
||||
|
|
@ -406,7 +406,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
<p>If you get the exception shown above, then you are using an
|
||||
older version of slf4j-api, e.g. 1.4.3, with a new version of a
|
||||
slf4j binding, e.g. 1.5.6. Typically, this occurs when your
|
||||
Maven <em>pom.ml</em> file incoprporates hibernate 3.3.0 which
|
||||
Maven <em>pom.ml</em> file incorporates hibernate 3.3.0 which
|
||||
declares a dependency on slf4j-api version 1.4.2. If your
|
||||
<em>pom.xml</em> declares a dependency on an slf4j binding, say
|
||||
slf4j-log4j12 version 1.5.6, then you will get illegal access
|
||||
|
|
@ -418,12 +418,12 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
|
||||
<p class="source">mvn dependency:tree</p>
|
||||
|
||||
<p>If you are usig Eclipse, please do not rely on the dependency
|
||||
<p>If you are using Eclipse, please do not rely on the dependency
|
||||
tree shown by <a
|
||||
href="http://m2eclipse.codehaus.org/">m2eclipse</a>.</p>
|
||||
|
||||
<p>In your <em>pom.xml</em> file, excplicitly declaring a
|
||||
dependecy on slf4j-api matching the version of the declared
|
||||
<p>In your <em>pom.xml</em> file, explicitly declaring a
|
||||
dependency on slf4j-api matching the version of the declared
|
||||
binding will make the problem go away.
|
||||
</p>
|
||||
|
||||
|
|
@ -574,7 +574,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
|
||||
<p>Some projects try to detect the presence of SLF4J on the
|
||||
class path and switch to it if present. While this approach
|
||||
seems transperent enough, it will result in erroneous location
|
||||
seems transparent enough, it will result in erroneous location
|
||||
information. Underlying logging frameworks will print the
|
||||
location (class name and line number) of the wrapper instead of
|
||||
the real caller. Then there is the question of API coverage as
|
||||
|
|
@ -648,7 +648,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
</dt>
|
||||
|
||||
<dd>
|
||||
<p><b>alternative 1) explicit exlusion</b></p>
|
||||
<p><b>alternative 1) explicit exclusion</b></p>
|
||||
|
||||
<p>Many software projects using Maven declare commons-logging as
|
||||
a dependency. Therefore, if you wish to migrate to SLF4J or use
|
||||
|
|
@ -686,7 +686,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
|
||||
<p>The first dependency declaration essentially states that
|
||||
commons-logging will be "somehow" provided by your
|
||||
environment. The second decleration includes jcl-over-slf4j into
|
||||
environment. The second declaration includes jcl-over-slf4j into
|
||||
your project. As jcl-over-slf4j is a perfect binary-compatible
|
||||
replacement for commons-logging, the first assertion becomes
|
||||
true.
|
||||
|
|
@ -694,7 +694,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
|
||||
<p>Unfortunately, while declaring commons-logging in the
|
||||
provided scope gets the job done, your IDE, e.g. Eclipse, will
|
||||
still place <em>commons-logging.jar</em> on your projet's class
|
||||
still place <em>commons-logging.jar</em> on your project's class
|
||||
path as seen by your IDE. You would need to make sure that
|
||||
<em>jcl-over-slf4j.jar</em> is visible before
|
||||
<em>commons-logging.jar</em> by your IDE.
|
||||
|
|
@ -714,7 +714,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
high-availability Maven repository, replicated on several hosts
|
||||
located in different geographical regions.</p>
|
||||
|
||||
<p>The following decleration adds the version99 repository to
|
||||
<p>The following declaration adds the version99 repository to
|
||||
the set of remote repositories searched by Maven. This
|
||||
repository contains empty artifacts for commons-logging and
|
||||
log4j. By the way, if you use the version99 repository, please
|
||||
|
|
@ -731,7 +731,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
|
|||
|
||||
<p>Declaring version 99-empty of commons-logging in the
|
||||
<code><dependencyManagement></code> section of your project
|
||||
will direct all transtive dependencies for commons-logging to
|
||||
will direct all transitive dependencies for commons-logging to
|
||||
import version 99-empty, thus nicely addressing the
|
||||
commons-logging exclusion problem. The classes for commons-logging
|
||||
will be provided by jcl-over-slf4j. The following lines declare
|
||||
|
|
@ -1022,7 +1022,7 @@ logger.debug("The new entry is {}.", entry);</pre>
|
|||
<pre class="prettyprint source">logger.debug("Set \\{} differs from {}", "3");</pre>
|
||||
|
||||
<p>will print as "Set {} differs from 3". Note that within
|
||||
Java code, the backslash cracacter needs to be written as
|
||||
Java code, the backslash character needs to be written as
|
||||
'\\'.</p>
|
||||
|
||||
<p>In the rare case where the "\{}" occurs naturally in the
|
||||
|
|
@ -1224,7 +1224,7 @@ class Bar {
|
|||
<!-- ================================================= -->
|
||||
|
||||
<dt class="doAnchor" name="paramException">In the presence of an
|
||||
exception/throwable, is it possible to parametizere a logging
|
||||
exception/throwable, is it possible to parameterize a logging
|
||||
statement?</dt>
|
||||
|
||||
|
||||
|
|
@ -1392,7 +1392,7 @@ try {
|
|||
participates in version checks.</p>
|
||||
|
||||
<p><b>As of SLF4J 1.5.5</b>, all bindings shipped within the
|
||||
SLF4J distribution, e.g. slf4j-logj12, slf4j-simple and
|
||||
SLF4J distribution, e.g. slf4j-log4j12, slf4j-simple and
|
||||
slf4j-jdk14, declare the REQUESTED_API_VERSION field with a
|
||||
value equal to their SLF4J version. It follows that, for example
|
||||
if slf4j-simple-1.5.8.jar is mixed with slf4j-api-1.6.0.jar,
|
||||
|
|
@ -1563,7 +1563,7 @@ try {
|
|||
<p>In summary, declaring logger members as static variables
|
||||
requires less CPU time and have a slightly smaller memory
|
||||
footprint. On the other hand, declaring logger members as
|
||||
instance variables requires more CPU time and have a slighlty
|
||||
instance variables requires more CPU time and have a slightly
|
||||
higher memory overhead. However, instance variables make it
|
||||
possible to create a distinct logger environment for each
|
||||
application, even for loggers declared in shared
|
||||
|
|
|
|||
|
|
@ -193,10 +193,10 @@
|
|||
</p>
|
||||
|
||||
<h4 class="doAnchor" name="log4jRecursion">log4j-over-slf4j.jar
|
||||
and slf4j-logj12.jar cannot be present simultaneously
|
||||
and slf4j-log4j12.jar cannot be present simultaneously
|
||||
</h4>
|
||||
|
||||
<p>The presence of <em>slf4j-logj12.jar</em>, that is the log4j
|
||||
<p>The presence of <em>slf4j-log4j12.jar</em>, that is the log4j
|
||||
binding for SLF4J, will force all SLF4J calls to be delegated to
|
||||
log4j. The presence of <em>log4j-over-slf4j.jar</em> will in turn
|
||||
delegate all log4j API calls to their SLF4J equivalents. If both
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
|
||||
<p>Let us assume that you have defined localized message in your
|
||||
application. In accordance with the CAL10N's philopshopy, you have
|
||||
application. In accordance with the CAL10N's philosophy, you have
|
||||
the declared the keys for those messages in the enum type
|
||||
<code>Production</code>.</p>
|
||||
|
||||
|
|
@ -79,8 +79,8 @@ APPLICATION_STOPPED=Application <b>{0}</b> has stopped.
|
|||
... </pre>
|
||||
|
||||
<p>Then, you
|
||||
can instantiate a <code>IMessageCoveyor</code>, inject it into a
|
||||
<code>LogLoggerFactory</code>, retreive multiple
|
||||
can instantiate a <code>IMessageConveyor</code>, inject it into a
|
||||
<code>LogLoggerFactory</code>, retrieve multiple
|
||||
<code>LogLogger</code> instances by name and log away, as the next
|
||||
sample code illustrates.
|
||||
</p>
|
||||
|
|
@ -148,7 +148,7 @@ public class MyApplication {
|
|||
locLogger.info(Production.APPLICATION_STARTED, "fooApp");
|
||||
|
||||
// follows the {} convention
|
||||
logLogger.ingo("Hello {}", name);
|
||||
logLogger.info("Hello {}", name);
|
||||
...
|
||||
}
|
||||
}</pre>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</p>
|
||||
|
||||
<p>Please do your best to ensure that you are not sending HTML or
|
||||
"Stylelized" email to the list. If you are using Outlook or Outlook
|
||||
"Stylized" email to the list. If you are using Outlook or Outlook
|
||||
Express or Eudora, chances are that you are sending HTML email by
|
||||
default. There is usually a setting that will allow you to send
|
||||
"Plain Text" email.
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
|
|||
on any SLF4J binding but only depend on slf4j-api</b>. When a
|
||||
library declares a transitive dependency on a specific binding,
|
||||
that binding is imposed on the end-user negating the purpose of
|
||||
SLF4J. Note that declaring a non-transitve dependecy on a
|
||||
SLF4J. Note that declaring a non-transitive dependency on a
|
||||
binding, for example for testing, does not affect the
|
||||
end-user.</p>
|
||||
|
||||
|
|
@ -469,7 +469,7 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
|
|||
<td>Due to the way that classes are loaded by the JVM, the
|
||||
framework binding will be verified automatically very early
|
||||
on. If SLF4J cannot find a binding on the class path it
|
||||
will emit a signle warning message and default to
|
||||
will emit a single warning message and default to
|
||||
no-operation implementation.
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ will be converted as
|
|||
<ul>
|
||||
<li>Calls to <code>finest()</code>, <code>finer()</code> or
|
||||
<code>finest()</code> methods of
|
||||
<code>java.util.loggging.Logger</code> are left as is.
|
||||
<code>java.util.logging.Logger</code> are left as is.
|
||||
|
||||
<p>Given that <code>finest()</code>, <code>finer()</code> or
|
||||
<code>finest()</code> calls could map to both trace() or debug()
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
git pull request.</p>
|
||||
|
||||
<p>Added missing methods and classes in log4j-over-slf4j module for
|
||||
Velocity compatibility. This isssue was reported in <a
|
||||
Velocity compatibility. This issue was reported in <a
|
||||
href="http://bugzilla.slf4j.org/show_bug.cgi?id=280">bug 280</a> by
|
||||
Thomas Mortagne.</p>
|
||||
|
||||
|
|
@ -369,10 +369,10 @@
|
|||
support as a thin layer built upon the <a
|
||||
href="http://cal10n.qos.ch">CAL10N API</a>.</p>
|
||||
|
||||
<p><a href="http://www.slf4j.org/android/">SLF4J-adroid</a>,
|
||||
<p><a href="http://www.slf4j.org/android/">SLF4J-android</a>,
|
||||
maintained by <a
|
||||
href="http://dbis.cs.unibas.ch/team/thorsten-moller/dbis_staff_view">Thorsten
|
||||
Möller</a>, was added as a daugther project of SLF4J.
|
||||
Möller</a>, was added as a daughter project of SLF4J.
|
||||
</p>
|
||||
|
||||
<p>Added missing "Export-Package" declaration for cal10n in the OSGi
|
||||
|
|
@ -399,7 +399,7 @@
|
|||
href="http://bugzilla.slf4j.org/show_bug.cgi?id=141">bug 141</a>.
|
||||
</p>
|
||||
|
||||
<p>Fixed a <code>NullPointerEception</code> occuring in unspecified
|
||||
<p>Fixed a <code>NullPointerException</code> occurring in unspecified
|
||||
conditions as described in <a
|
||||
href="http://bugzilla.slf4j.org/show_bug.cgi?id=146">bug report
|
||||
146</a> by Dapeng Ni.</p>
|
||||
|
|
@ -1012,7 +1012,7 @@
|
|||
slf4j-parent pom. The solution to <a
|
||||
href="http://ceki.blogspot.com/2006/11/solution-to-maven2-version-number.html">Maven
|
||||
version problem</a> does not work for public projects such as SLF4J
|
||||
because SNAPHOTs are not allowed on ibiblio.
|
||||
because SNAPSHOTs are not allowed on ibiblio.
|
||||
</p>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue