[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch, master, updated. v_1.6.1-32-gebf0578
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Thu Apr 28 19:32:25 CEST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SLF4J: Simple Logging Facade for Java".
The branch, master has been updated
via ebf05781718598adebd1e8fc058f459891002682 (commit)
from bdc80857eea22530e29222fd773e847c44e7ce3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=ebf05781718598adebd1e8fc058f459891002682
http://github.com/ceki/slf4j/commit/ebf05781718598adebd1e8fc058f459891002682
commit ebf05781718598adebd1e8fc058f459891002682
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Apr 28 19:26:18 2011 +0200
version mismatch related editions
diff --git a/slf4j-site/src/site/pages/codes.html b/slf4j-site/src/site/pages/codes.html
index 3dd90a0..dbbefcf 100644
--- a/slf4j-site/src/site/pages/codes.html
+++ b/slf4j-site/src/site/pages/codes.html
@@ -88,7 +88,7 @@
<h3>
<a name="StaticLoggerBinder" href="#StaticLoggerBinder">
- Failed to load class
+ Failedto load class
<code>org.slf4j.impl.StaticLoggerBinder</code>
</a>
</h3>
@@ -169,38 +169,33 @@
<h3><a name="version_mismatch" href="#version_mismatch">slf4j-api
version does not match that of the binding</a></h3>
- <p>An slf4j binding designates an artifact such as
+ <p>An SLF4J binding designates an artifact such as
<em>slf4j-jdk14.jar</em> or <em>slf4j-log4j12.jar</em> used to
<em>bind</em> slf4j to an underlying logging framework, say,
java.util.logging or log4j.
</p>
- <p>Mixing mixing different versions of slf4j-api and slf4j
- bindings can cause problems. For example, if you are using
+ <p>Mixing mixing different versions of <em>slf4j-api.jar</em> and
+ SLF4J binding can cause problems. For example, if you are using
slf4j-api-${project.version}.jar, then you should also use
slf4j-simple-${project.version}.jar, using slf4j-simple-1.5.5.jar
- will not work.
- </p>
-
- <p><b>Note that from the client's perspective all versions of
- slf4j-api are compatible.</b> Customer code compiled with a given
- version of <em>slf4j-api.jar</em> will run perfectly fine with any
- other version of <em>slf4j-api.jar</em>. You only need to verify
- that the version of your binding matches that of the slf4j-api.
- </p>
-
- <p><span class="red">In general, you should make sure that the
- slf4j-api version matches that of the slf4j binding. However, you
- do <b>not</b> have to worry about the version of slf4j-api
- customer code was compiled against.</span> See also the <a
- href="faq.html#compatibility">relevant FAQ entry</a>.
+ will not work.</p>
+
+ <p>It should be noted that from the client's perspective all
+ versions of slf4j-api are compatible. Client code compiled with
+ <em>slf4j-api-N.jar</em> will run perfectly fine with
+ <em>slf4j-api-M.jar</em> for any N and M. You only need to ensure
+ that the version of your binding matches that of the
+ slf4j-api.jar. You do not have to worry about the version of
+ slf4j-api.jar used by a given dependendency in your project. You
+ can always use any version of <em>slf4j-api.jar</em>, and as long
+ as the version of <em>slf4j-api.jar</em> and its binding match,
+ you should be fine.
</p>
<p>At initialization time, if SLF4J suspects that there may be a
- version mismatch problem, it will emit a warning about the
- suspected mismatch. For the exact details of the version mismatch
- detection mechanism, please refer to the <a
- href="faq.html#version_checks">relevant entry</a> in the FAQ.
+ api vs. binding version mismatch problem, it will emit a warning
+ about the suspected mismatch.
</p>
diff --git a/slf4j-site/src/site/pages/faq.html b/slf4j-site/src/site/pages/faq.html
index 155f4df..37f3b2b 100644
--- a/slf4j-site/src/site/pages/faq.html
+++ b/slf4j-site/src/site/pages/faq.html
@@ -359,27 +359,25 @@
<dd>
<p>From the clients perspective, the SLF4J API is backward
- compatible between all versions. This means than you can upgrade
+ compatible for all versions. This means than you can upgrade
from SLF4J version 1.0 to any later version without
problems. Code compiled with <em>slf4j-api-versionN.jar</em>
will work with <em>slf4j-api-versionM.jar</em> for any versionN
and any versionM</p>
<p>However, while the SLF4J API is very stable from the client's
- perspective, SLF4J bindings such as slf4j-simple or
- slf4j-log4j12 may require a specific version of slf4j-api. <span
- class="redBold">Mixing different versions of slf4j artifacts can
- be problematic and is strongly discouraged. </span> For
- instance, if you are using slf4j-api-1.5.6.jar, then you should
- also use slf4j-simple-1.5.6.jar, using slf4j-simple-1.4.2.jar
- will not work.
+ perspective, SLF4J bindings, e.g. slf4j-simple.jar or
+ slf4j-log4j12.jar, may require a specific version of slf4j-api.
+ Mixing different versions of slf4j artifacts can be problematic
+ and is strongly discouraged. For instance, if you are using
+ slf4j-api-1.5.6.jar, then you should also use
+ slf4j-simple-1.5.6.jar, using slf4j-simple-1.4.2.jar will not
+ work.
</p>
<p>At initialization time, if SLF4J suspects that there may be a
version mismatch problem, it emits a warning about the said
- mismatch. For the exact details of the version mismatch
- detection mechanism, please refer to the <a
- href="#version_checks">relevant entry</a> in this FAQ.
+ mismatch.
</p>
<hr />
diff --git a/slf4j-site/src/site/pages/index.html b/slf4j-site/src/site/pages/index.html
index 99bc8de..7f9571d 100644
--- a/slf4j-site/src/site/pages/index.html
+++ b/slf4j-site/src/site/pages/index.html
@@ -29,20 +29,26 @@
<p>The Simple Logging Facade for Java or (SLF4J) serves as a simple
facade or abstraction for various logging frameworks, e.g.
java.util.logging, log4j and logback, allowing the end user to plug
- in the desired logging framework at <em>deployment</em> time.
- </p>
+ in the desired logging framework at <em>deployment</em>
+ time. </p>
<p>Before you start using SLF4J, we highly recommend that you read
the two-page <a href="manual.html">SLF4J user manual</a>.
</p>
+ <p>Note that SLF4J-enabling your library implies the addition of
+ only a single mandatory dependency, namely <em>slf4j-api.jar</em>.
+ If no binding is found on the class path, then SLF4J will default to
+ a no-operation implementation.
+ </p>
+
<p>In case you wish to migrate your Java source files to SLF4J,
consider our <a href="migrator.html">migrator tool</a> which can
migrate your project into SLF4J in minutes.</p>
<p>In case an externally-maintained component you depend on uses a
logging API other than SLF4J, such as commons logging, log4j or
- j.u.l, have a look at SLF4J's binary-support for <a
+ java.util.logging, have a look at SLF4J's binary-support for <a
href="legacy.html">legacy APIs</a>.
</p>
diff --git a/slf4j-site/src/site/pages/manual.html b/slf4j-site/src/site/pages/manual.html
index cb1f9c8..7c48707 100644
--- a/slf4j-site/src/site/pages/manual.html
+++ b/slf4j-site/src/site/pages/manual.html
@@ -25,16 +25,21 @@
simple facade or abstraction for various logging frameworks, e.g.
java.util.logging, log4j and logback, allowing the end-user to
plug in the desired logging framework at <em>deployment</em> time.
+ Note that SLF4J-enabling your library/application implies the
+ addition of only a single mandatory dependency, namely
+ <em>slf4j-api-${project.version}.jar</em>. If no binding is found
+ on the class path, then SLF4J will default to a no-operation
+ implementation.
</p>
<h3>
<a name="hello_world" href="#hello_world">Hello World</a>
</h3>
- <p>In accordance with programming tradition, here is an example
+ <p>As customary in programming tradition, here is an example
illustrating the simplest way to output "Hello world" using SLF4J.
It begins by getting a logger with the name "HelloWorld". This
- logger is in turn used to log the message "Hello World".
+ logger is in turn used to log the message "Hello World".
</p>
<pre class="prettyprint source">import org.slf4j.Logger;
@@ -49,16 +54,31 @@ public class HelloWorld {
<p>To run this example, you first need to <a
href="download.html">download the slf4j distribution</a>, and
- then to unpack it. Once that is done, add these two jar files to
- your class path:</p>
+ then to unpack it. Once that is done, add the file
+ <em>slf4j-api-${project.version}.jar</em> to your class path.</p>
+ <p>Compiling and running <em>HelloWorld</em> will result in the
+ following output being printed on the console.</p>
+
+<pre>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
+SLF4J: Defaulting to no-operation (NOP) logger implementation
+SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.</pre>
+
+ <p>This warning is printed because no slf4j binding could be
+ found on your class path.</p>
+
+ <p>The warning will disappear as soon as you add a binding to
+ your class path. Assuming you add
+ <em>slf4j-simple-${project.version}.jar</em> so that your class
+ path contains:</p>
+
<ul>
<li>slf4j-api-${project.version}.jar</li>
<li>slf4j-simple-${project.version}.jar</li>
</ul>
- <p>Compiling and running <em>HelloWorld</em> will result in the
- following output being printed on the console.</p>
+ <p>Compiling and running <em>HelloWorld</em> will now result in
+ the following output on the console.</p>
<pre class="output">0 [main] INFO HelloWorld - Hello World</pre>
@@ -225,7 +245,7 @@ public class HelloWorld {
out-of-the-box, and without requiring the end-user to download a
binding from SLF4J's web-site. Only when the end-user decides to
enable logging will she need to install the SLF4J binding
- corresponding to the logging framework chosen by the end-user.
+ corresponding to the logging framework chosen by her.
</p>
<h3><a name="consolidate" href="#consolidate">Consolidate
-----------------------------------------------------------------------
Summary of changes:
slf4j-site/src/site/pages/codes.html | 39 ++++++++++++++------------------
slf4j-site/src/site/pages/faq.html | 20 +++++++---------
slf4j-site/src/site/pages/index.html | 12 +++++++--
slf4j-site/src/site/pages/manual.html | 34 ++++++++++++++++++++++------
4 files changed, 62 insertions(+), 43 deletions(-)
hooks/post-receive
--
SLF4J: Simple Logging Facade for Java
More information about the slf4j-dev
mailing list