[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch master updated. v_1.6.6-17-g255def2
Gitbot
git-noreply at pixie.qos.ch
Thu Sep 6 23:46:54 CEST 2012
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 255def2278b87df16f24ad119a865b0ce5cb71d1 (commit)
from 86eaa9cf19193c9e8c471283b23149aa87a88573 (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=255def2278b87df16f24ad119a865b0ce5cb71d1
http://github.com/ceki/slf4j/commit/255def2278b87df16f24ad119a865b0ce5cb71d1
commit 255def2278b87df16f24ad119a865b0ce5cb71d1
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Sep 6 23:46:19 2012 +0200
avoid version mismatch warning (when run with slf4j-api-1.6.jar) by setting REQUESTED_VERSION to 1.6.99 instead of 1.7
diff --git a/integration/build.xml b/integration/build.xml
index 9652ce3..d3a5d5a 100644
--- a/integration/build.xml
+++ b/integration/build.xml
@@ -67,10 +67,10 @@
<pathelement location="../slf4j-nop/target/slf4j-nop-${currentVersion}.jar" />
</path >
- <path id="binding1699">
+ <path id="binding166">
<pathelement location="target/test-classes/" />
<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
- <pathelement location="./lib/slf4j-simple-1.6.99.jar" />
+ <pathelement location="./lib/slf4j-simple-1.6.6.jar" />
</path >
<path id="binding2099">
@@ -80,10 +80,10 @@
</path >
- <path id="api1699">
+ <path id="api166">
<pathelement location="target/test-classes/" />
<pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" />
- <pathelement location="./lib/slf4j-api-1.6.99.jar" />
+ <pathelement location="./lib/slf4j-api-1.6.6.jar" />
</path >
@@ -180,19 +180,19 @@
<target name="testFuture_16Series">
<junit printsummary="yes" fork="no" haltonfailure="yes">
- <classpath refid="binding1699" />
+ <classpath refid="binding166" />
<formatter type="plain" />
<test fork="yes" todir="target/unit-reports"
- outfile="TEST-binding1699"
+ outfile="TEST-binding166"
name="org.slf4j.CompatibilityAssertionTest" />
</junit>
<junit printsummary="yes" fork="no" haltonfailure="yes">
- <classpath refid="api1699" />
+ <classpath refid="api166" />
<formatter type="plain" />
<test fork="yes" todir="target/unit-reports"
- outfile="TEST-api1699"
+ outfile="TEST-api166"
name="org.slf4j.CompatibilityAssertionTest" />
</junit>
diff --git a/slf4j-api/src/main/java/org/slf4j/Logger.java b/slf4j-api/src/main/java/org/slf4j/Logger.java
index 83e60e8..8853285 100644
--- a/slf4j-api/src/main/java/org/slf4j/Logger.java
+++ b/slf4j-api/src/main/java/org/slf4j/Logger.java
@@ -26,15 +26,15 @@
package org.slf4j;
/**
- * The org.slf4j.Logger interface is the main user entry point of SLF4J API.
- * It is expected that logging takes place through concrete implementations
+ * The org.slf4j.Logger interface is the main user entry point of SLF4J API.
+ * It is expected that logging takes place through concrete implementations
* of this interface.
- *
+ * <p/>
* <h3>Typical usage pattern:</h3>
* <pre>
* import org.slf4j.Logger;
* import org.slf4j.LoggerFactory;
- *
+ *
* public class Wombat {
*
* <span style="color:green">final static Logger logger = LoggerFactory.getLogger(Wombat.class);</span>
@@ -42,7 +42,7 @@ package org.slf4j;
* Integer oldT;
*
* public void setTemperature(Integer temperature) {
- * oldT = t;
+ * oldT = t;
* t = temperature;
* <span style="color:green">logger.debug("Temperature set to {}. Old temperature was {}.", t, oldT);</span>
* if(temperature.intValue() > 50) {
@@ -50,10 +50,8 @@ package org.slf4j;
* }
* }
* }
- </pre>
-
-
-
+ * </pre>
+ *
* @author Ceki Gülcü
*/
public interface Logger {
@@ -61,10 +59,11 @@ public interface Logger {
/**
* Case insensitive String constant used to retrieve the name of the root logger.
+ *
* @since 1.3
*/
final public String ROOT_LOGGER_NAME = "ROOT";
-
+
/**
* Return the name of this <code>Logger</code> instance.
*/
@@ -72,13 +71,13 @@ public interface Logger {
/**
* Is the logger instance enabled for the TRACE level?
+ *
* @return True if this Logger is enabled for the TRACE level,
- * false otherwise.
- *
+ * false otherwise.
* @since 1.4
*/
public boolean isTraceEnabled();
-
+
/**
* Log a message at the TRACE level.
@@ -88,34 +87,31 @@ public interface Logger {
*/
public void trace(String msg);
-
+
/**
* Log a message at the TRACE level according to the specified format
* and argument.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the TRACE level. </p>
*
- * @param format the format string
- * @param arg the argument
- *
+ * @param format the format string
+ * @param arg the argument
* @since 1.4
*/
public void trace(String format, Object arg);
-
/**
* Log a message at the TRACE level according to the specified format
* and arguments.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the TRACE level. </p>
*
* @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
- *
+ * @param arg1 the first argument
+ * @param arg2 the second argument
* @since 1.4
*/
public void trace(String format, Object arg1, Object arg2);
@@ -123,72 +119,69 @@ public interface Logger {
/**
* Log a message at the TRACE level according to the specified format
* and arguments.
- *
- * <p>This form avoids superfluous object creation when the logger
- * is disabled for the TRACE level. </p>
+ * <p/>
+ * <p>This form avoids superfluous string concatenation when the logger
+ * is disabled for the TRACE level. However, this variant incurs the hidden
+ * (and relatively small) cost of creating an <code>Object[]</code> before invoking the method,
+ * even if this logger is disabled for TRACE. The variants taking {@link #trace(String, Object) one} and
+ * {@link #trace(String, Object, Object) two} arguments exist solely in order to avoid this hidden cost.</p>
*
- * @param format the format string
+ * @param format the format string
* @param arguments a list of 3 or more arguments
- *
* @since 1.4
*/
public void trace(String format, Object... arguments);
-
+
/**
* Log an exception (throwable) at the TRACE level with an
- * accompanying message.
- *
+ * accompanying message.
+ *
* @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- *
+ * @param t the exception (throwable) to log
* @since 1.4
- */
+ */
public void trace(String msg, Throwable t);
-
-
+
+
/**
* Similar to {@link #isTraceEnabled()} method except that the
* marker data is also taken into account.
- *
+ *
* @param marker The marker data to take into consideration
- *
* @since 1.4
*/
public boolean isTraceEnabled(Marker marker);
-
+
/**
* Log a message with the specific Marker at the TRACE level.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param msg the message string to be logged
- *
+ * @param msg the message string to be logged
* @since 1.4
*/
public void trace(Marker marker, String msg);
-
+
/**
- * This method is similar to {@link #trace(String, Object)} method except that the
+ * This method is similar to {@link #trace(String, Object)} method except that the
* marker data is also taken into consideration.
- *
+ *
* @param marker the marker data specific to this log statement
* @param format the format string
- * @param arg the argument
- *
+ * @param arg the argument
* @since 1.4
*/
public void trace(Marker marker, String format, Object arg);
-
-
+
+
/**
* This method is similar to {@link #trace(String, Object, Object)}
* method except that the marker data is also taken into
* consideration.
*
* @param marker the marker data specific to this log statement
- * @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
- *
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
* @since 1.4
*/
public void trace(Marker marker, String format, Object arg1, Object arg2);
@@ -198,130 +191,131 @@ public interface Logger {
* method except that the marker data is also taken into
* consideration.
*
- * @param marker the marker data specific to this log statement
- * @param format the format string
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
* @param argArray an array of arguments
- *
* @since 1.4
*/
public void trace(Marker marker, String format, Object... argArray);
-
+
/**
* This method is similar to {@link #trace(String, Throwable)} method except that the
* marker data is also taken into consideration.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- *
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
* @since 1.4
- */
+ */
public void trace(Marker marker, String msg, Throwable t);
-
+
/**
* Is the logger instance enabled for the DEBUG level?
+ *
* @return True if this Logger is enabled for the DEBUG level,
- * false otherwise.
- *
+ * false otherwise.
*/
public boolean isDebugEnabled();
-
-
+
+
/**
* Log a message at the DEBUG level.
*
* @param msg the message string to be logged
*/
public void debug(String msg);
-
-
+
+
/**
* Log a message at the DEBUG level according to the specified format
* and argument.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the DEBUG level. </p>
*
- * @param format the format string
- * @param arg the argument
+ * @param format the format string
+ * @param arg the argument
*/
public void debug(String format, Object arg);
-
/**
* Log a message at the DEBUG level according to the specified format
* and arguments.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the DEBUG level. </p>
*
* @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
public void debug(String format, Object arg1, Object arg2);
/**
* Log a message at the DEBUG level according to the specified format
* and arguments.
- *
- * <p>This form avoids superfluous object creation when the logger
- * is disabled for the DEBUG level. </p>
+ * <p/>
+ * <p>This form avoids superfluous string concatenation when the logger
+ * is disabled for the DEBUG level. However, this variant incurs the hidden
+ * (and relatively small) cost of creating an <code>Object[]</code> before invoking the method,
+ * even if this logger is disabled for DEBUG. The variants taking
+ * {@link #debug(String, Object) one} and {@link #debug(String, Object, Object) two}
+ * arguments exist solely in order to avoid this hidden cost.</p>
*
- * @param format the format string
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void debug(String format, Object... arguments);
-
+
/**
* Log an exception (throwable) at the DEBUG level with an
- * accompanying message.
- *
+ * accompanying message.
+ *
* @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- */
+ * @param t the exception (throwable) to log
+ */
public void debug(String msg, Throwable t);
-
-
+
+
/**
* Similar to {@link #isDebugEnabled()} method except that the
* marker data is also taken into account.
- *
+ *
* @param marker The marker data to take into consideration
*/
public boolean isDebugEnabled(Marker marker);
-
+
/**
* Log a message with the specific Marker at the DEBUG level.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param msg the message string to be logged
+ * @param msg the message string to be logged
*/
public void debug(Marker marker, String msg);
-
+
/**
- * This method is similar to {@link #debug(String, Object)} method except that the
+ * This method is similar to {@link #debug(String, Object)} method except that the
* marker data is also taken into consideration.
- *
+ *
* @param marker the marker data specific to this log statement
* @param format the format string
- * @param arg the argument
+ * @param arg the argument
*/
public void debug(Marker marker, String format, Object arg);
-
-
+
+
/**
* This method is similar to {@link #debug(String, Object, Object)}
* method except that the marker data is also taken into
* consideration.
*
* @param marker the marker data specific to this log statement
- * @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
public void debug(Marker marker, String format, Object arg1, Object arg2);
@@ -330,84 +324,89 @@ public interface Logger {
* method except that the marker data is also taken into
* consideration.
*
- * @param marker the marker data specific to this log statement
- * @param format the format string
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void debug(Marker marker, String format, Object... arguments);
-
+
/**
* This method is similar to {@link #debug(String, Throwable)} method except that the
* marker data is also taken into consideration.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- */
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
public void debug(Marker marker, String msg, Throwable t);
-
-
+
+
/**
* Is the logger instance enabled for the INFO level?
+ *
* @return True if this Logger is enabled for the INFO level,
- * false otherwise.
+ * false otherwise.
*/
public boolean isInfoEnabled();
-
+
/**
* Log a message at the INFO level.
*
* @param msg the message string to be logged
*/
public void info(String msg);
-
+
/**
* Log a message at the INFO level according to the specified format
* and argument.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the INFO level. </p>
*
- * @param format the format string
- * @param arg the argument
+ * @param format the format string
+ * @param arg the argument
*/
public void info(String format, Object arg);
-
+
/**
* Log a message at the INFO level according to the specified format
* and arguments.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the INFO level. </p>
*
* @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
public void info(String format, Object arg1, Object arg2);
/**
* Log a message at the INFO level according to the specified format
* and arguments.
- *
- * <p>This form avoids superfluous object creation when the logger
- * is disabled for the INFO level. </p>
+ * <p/>
+ * <p>This form avoids superfluous string concatenation when the logger
+ * is disabled for the INFO level. However, this variant incurs the hidden
+ * (and relatively small) cost of creating an <code>Object[]</code> before invoking the method,
+ * even if this logger is disabled for INFO. The variants taking
+ * {@link #info(String, Object) one} and {@link #info(String, Object, Object) two}
+ * arguments exist solely in order to avoid this hidden cost.</p>
*
- * @param format the format string
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void info(String format, Object... arguments);
-
+
/**
* Log an exception (throwable) at the INFO level with an
- * accompanying message.
- *
+ * accompanying message.
+ *
* @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
+ * @param t the exception (throwable) to log
*/
public void info(String msg, Throwable t);
@@ -418,65 +417,66 @@ public interface Logger {
* @param marker The marker data to take into consideration
*/
public boolean isInfoEnabled(Marker marker);
-
+
/**
* Log a message with the specific Marker at the INFO level.
- *
+ *
* @param marker The marker specific to this log statement
- * @param msg the message string to be logged
+ * @param msg the message string to be logged
*/
public void info(Marker marker, String msg);
-
+
/**
- * This method is similar to {@link #info(String, Object)} method except that the
+ * This method is similar to {@link #info(String, Object)} method except that the
* marker data is also taken into consideration.
*
* @param marker the marker data specific to this log statement
* @param format the format string
- * @param arg the argument
+ * @param arg the argument
*/
public void info(Marker marker, String format, Object arg);
-
+
/**
* This method is similar to {@link #info(String, Object, Object)}
* method except that the marker data is also taken into
* consideration.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
- public void info(Marker marker, String format, Object arg1, Object arg2);
-
-
+ public void info(Marker marker, String format, Object arg1, Object arg2);
+
+
/**
* This method is similar to {@link #info(String, Object...)}
* method except that the marker data is also taken into
* consideration.
*
- * @param marker the marker data specific to this log statement
- * @param format the format string
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void info(Marker marker, String format, Object... arguments);
-
+
/**
* This method is similar to {@link #info(String, Throwable)} method
* except that the marker data is also taken into consideration.
- *
+ *
* @param marker the marker data for this log statement
- * @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- */
- public void info(Marker marker, String msg, Throwable t);
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void info(Marker marker, String msg, Throwable t);
+
-
/**
* Is the logger instance enabled for the WARN level?
+ *
* @return True if this Logger is enabled for the WARN level,
- * false otherwise.
+ * false otherwise.
*/
public boolean isWarnEnabled();
@@ -487,53 +487,57 @@ public interface Logger {
*/
public void warn(String msg);
- /**
+ /**
* Log a message at the WARN level according to the specified format
* and argument.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the WARN level. </p>
*
- * @param format the format string
- * @param arg the argument
+ * @param format the format string
+ * @param arg the argument
*/
public void warn(String format, Object arg);
-
+
/**
* Log a message at the WARN level according to the specified format
* and arguments.
- *
- * <p>This form avoids superfluous object creation when the logger
- * is disabled for the WARN level. </p>
+ * <p/>
+ * <p>This form avoids superfluous string concatenation when the logger
+ * is disabled for the WARN level. However, this variant incurs the hidden
+ * (and relatively small) cost of creating an <code>Object[]</code> before invoking the method,
+ * even if this logger is disabled for WARN. The variants taking
+ * {@link #warn(String, Object) one} and {@link #warn(String, Object, Object) two}
+ * arguments exist solely in order to avoid this hidden cost.</p>
*
- * @param format the format string
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void warn(String format, Object... arguments);
-
+
/**
* Log a message at the WARN level according to the specified format
* and arguments.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the WARN level. </p>
*
* @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
public void warn(String format, Object arg1, Object arg2);
-
+
/**
* Log an exception (throwable) at the WARN level with an
- * accompanying message.
- *
+ * accompanying message.
+ *
* @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
+ * @param t the exception (throwable) to log
*/
public void warn(String msg, Throwable t);
-
+
/**
* Similar to {@link #isWarnEnabled()} method except that the marker
@@ -542,117 +546,122 @@ public interface Logger {
* @param marker The marker data to take into consideration
*/
public boolean isWarnEnabled(Marker marker);
-
+
/**
* Log a message with the specific Marker at the WARN level.
- *
+ *
* @param marker The marker specific to this log statement
- * @param msg the message string to be logged
+ * @param msg the message string to be logged
*/
- public void warn(Marker marker, String msg);
-
+ public void warn(Marker marker, String msg);
+
/**
- * This method is similar to {@link #warn(String, Object)} method except that the
+ * This method is similar to {@link #warn(String, Object)} method except that the
* marker data is also taken into consideration.
- *
+ *
* @param marker the marker data specific to this log statement
* @param format the format string
- * @param arg the argument
+ * @param arg the argument
*/
public void warn(Marker marker, String format, Object arg);
-
+
/**
* This method is similar to {@link #warn(String, Object, Object)}
* method except that the marker data is also taken into
* consideration.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
- public void warn(Marker marker, String format, Object arg1, Object arg2);
-
+ public void warn(Marker marker, String format, Object arg1, Object arg2);
+
/**
* This method is similar to {@link #warn(String, Object...)}
* method except that the marker data is also taken into
* consideration.
*
- * @param marker the marker data specific to this log statement
- * @param format the format string
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void warn(Marker marker, String format, Object... arguments);
-
+
/**
* This method is similar to {@link #warn(String, Throwable)} method
* except that the marker data is also taken into consideration.
- *
+ *
* @param marker the marker data for this log statement
- * @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- */
- public void warn(Marker marker, String msg, Throwable t);
-
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void warn(Marker marker, String msg, Throwable t);
+
/**
* Is the logger instance enabled for the ERROR level?
+ *
* @return True if this Logger is enabled for the ERROR level,
- * false otherwise.
+ * false otherwise.
*/
public boolean isErrorEnabled();
-
+
/**
* Log a message at the ERROR level.
*
* @param msg the message string to be logged
*/
public void error(String msg);
-
- /**
+
+ /**
* Log a message at the ERROR level according to the specified format
* and argument.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the ERROR level. </p>
*
- * @param format the format string
- * @param arg the argument
+ * @param format the format string
+ * @param arg the argument
*/
public void error(String format, Object arg);
/**
* Log a message at the ERROR level according to the specified format
* and arguments.
- *
+ * <p/>
* <p>This form avoids superfluous object creation when the logger
* is disabled for the ERROR level. </p>
*
* @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
public void error(String format, Object arg1, Object arg2);
/**
* Log a message at the ERROR level according to the specified format
* and arguments.
- *
- * <p>This form avoids superfluous object creation when the logger
- * is disabled for the ERROR level. </p>
+ * <p/>
+ * <p>This form avoids superfluous string concatenation when the logger
+ * is disabled for the ERROR level. However, this variant incurs the hidden
+ * (and relatively small) cost of creating an <code>Object[]</code> before invoking the method,
+ * even if this logger is disabled for ERROR. The variants taking
+ * {@link #error(String, Object) one} and {@link #error(String, Object, Object) two}
+ * arguments exist solely in order to avoid this hidden cost.</p>
*
- * @param format the format string
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void error(String format, Object... arguments);
-
+
/**
* Log an exception (throwable) at the ERROR level with an
- * accompanying message.
- *
+ * accompanying message.
+ *
* @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
+ * @param t the exception (throwable) to log
*/
public void error(String msg, Throwable t);
@@ -664,58 +673,58 @@ public interface Logger {
* @param marker The marker data to take into consideration
*/
public boolean isErrorEnabled(Marker marker);
-
+
/**
* Log a message with the specific Marker at the ERROR level.
- *
+ *
* @param marker The marker specific to this log statement
- * @param msg the message string to be logged
+ * @param msg the message string to be logged
*/
- public void error(Marker marker, String msg);
-
+ public void error(Marker marker, String msg);
+
/**
- * This method is similar to {@link #error(String, Object)} method except that the
+ * This method is similar to {@link #error(String, Object)} method except that the
* marker data is also taken into consideration.
- *
+ *
* @param marker the marker data specific to this log statement
* @param format the format string
- * @param arg the argument
+ * @param arg the argument
*/
public void error(Marker marker, String format, Object arg);
-
+
/**
* This method is similar to {@link #error(String, Object, Object)}
* method except that the marker data is also taken into
* consideration.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param format the format string
- * @param arg1 the first argument
- * @param arg2 the second argument
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
*/
- public void error(Marker marker, String format, Object arg1, Object arg2);
-
+ public void error(Marker marker, String format, Object arg1, Object arg2);
+
/**
* This method is similar to {@link #error(String, Object...)}
* method except that the marker data is also taken into
* consideration.
*
- * @param marker the marker data specific to this log statement
- * @param format the format string
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
* @param arguments a list of 3 or more arguments
*/
public void error(Marker marker, String format, Object... arguments);
-
+
/**
* This method is similar to {@link #error(String, Throwable)}
* method except that the marker data is also taken into
* consideration.
- *
+ *
* @param marker the marker data specific to this log statement
- * @param msg the message accompanying the exception
- * @param t the exception (throwable) to log
- */
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
public void error(Marker marker, String msg, Throwable t);
}
diff --git a/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
index 606a406..7148e80 100644
--- a/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ b/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -57,7 +57,7 @@ public class StaticLoggerBinder {
* The value of this field is usually modified with each release.
*/
// to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.7"; // !final
+ public static String REQUESTED_API_VERSION = "1.6.99"; // !final
private StaticLoggerBinder() {
throw new UnsupportedOperationException("This code should have never made it into slf4j-api.jar");
diff --git a/slf4j-jcl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j-jcl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
index fca85e5..6705d55 100644
--- a/slf4j-jcl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ b/slf4j-jcl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -56,7 +56,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
*/
//to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.7";
+ public static String REQUESTED_API_VERSION = "1.6.99";
// Binding specific code:
private static final String loggerFactoryClassStr = JCLLoggerFactory.class
diff --git a/slf4j-jdk14/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j-jdk14/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
index b90e885..ecc7b26 100644
--- a/slf4j-jdk14/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ b/slf4j-jdk14/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -57,7 +57,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
* The value of this field is usually modified with each release.
*/
// to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.7"; // !final
+ public static String REQUESTED_API_VERSION = "1.6.99"; // !final
private static final String loggerFactoryClassStr = org.slf4j.impl.JDK14LoggerFactory.class.getName();
diff --git a/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java b/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java
index 5453523..8c14dfa 100644
--- a/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java
+++ b/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java
@@ -71,7 +71,7 @@ public class InvocationTest extends TestCase {
logger.debug("Hello world {}", i1);
logger.debug("val={} val={}", i1, i2);
logger.debug("val={} val={} val={}", new Object[]{i1, i2, i3});
-
+
logger.debug("Hello world 2", e);
logger.info("Hello world 2.");
diff --git a/slf4j-log4j12/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j-log4j12/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
index 7be00e7..43d3b24 100644
--- a/slf4j-log4j12/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ b/slf4j-log4j12/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -58,7 +58,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
* against. The value of this field is usually modified with each release.
*/
// to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.7"; // !final
+ public static String REQUESTED_API_VERSION = "1.6.99"; // !final
private static final String loggerFactoryClassStr = Log4jLoggerFactory.class
.getName();
diff --git a/slf4j-nop/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j-nop/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
index ab7c824..61f0599 100644
--- a/slf4j-nop/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ b/slf4j-nop/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -58,7 +58,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
* The value of this field is usually modified with each release.
*/
// to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.7"; // !final
+ public static String REQUESTED_API_VERSION = "1.6.99"; // !final
private static final String loggerFactoryClassStr = NOPLoggerFactory.class.getName();
diff --git a/slf4j-simple/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/slf4j-simple/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
index 28980a9..92a995e 100644
--- a/slf4j-simple/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
+++ b/slf4j-simple/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -58,7 +58,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
* against. The value of this field is usually modified with each release.
*/
// to avoid constant folding by the compiler, this field must *not* be final
- public static String REQUESTED_API_VERSION = "1.7"; // !final
+ public static String REQUESTED_API_VERSION = "1.6.99"; // !final
private static final String loggerFactoryClassStr = SimpleLoggerFactory.class.getName();
diff --git a/slf4j-site/src/site/pages/faq.html b/slf4j-site/src/site/pages/faq.html
index e80021a..bef02f6 100644
--- a/slf4j-site/src/site/pages/faq.html
+++ b/slf4j-site/src/site/pages/faq.html
@@ -303,11 +303,9 @@
<dd>
- <p>In principle, SLF4J requires JDK 1.3 or above, in
- particular slf4j-api is compatible with JDK 1.3. However,
- the underlying logging system might have a higher
- requirement. For instance, the <em>slf4j-jdk14</em> binding
- requires JDK 1.4. Logback requires JDK 1.5.
+ <p>As of version 1.7.0, SLF4J requires JDK 1.5 or later. Earlier
+ SLF4J versions, namely SLF4J 1.4, 1.5. and 1.6, required JDK
+ 1.4.
</p>
<p> </p>
@@ -320,25 +318,25 @@
<tr>
<td>slf4j-nop</td>
- <td>JDK 1.3</td>
+ <td>JDK 1.5</td>
</tr>
<tr>
<td>slf4j-simple</td>
- <td>JDK 1.3</td>
+ <td>JDK 1.5</td>
</tr>
<tr>
<td>slf4j-log4j12</td>
- <td align="left">JDK 1.3, plus any other library
+ <td align="left">JDK 1.5, plus any other library
dependencies required by the log4j appenders in use</td>
</tr>
<tr>
<td>slf4j-jdk14</td>
- <td>JDK 1.4 or above</td>
+ <td>JDK 1.5 or later</td>
</tr>
<tr>
<td>logback-classic</td>
- <td>JDK 1.5 or above, plus any other library dependencies
+ <td>JDK 1.5 or later, plus any other library dependencies
required by the logback appenders in use</td>
</tr>
@@ -958,18 +956,27 @@ logger.debug("The entry is {}.", entry);</pre>
logger.debug("The new entry is {}.", entry);</pre>
- <p>A two argument variant is also available. For example, you
- can write:</p>
+ <p>A <a
+ href="apidocs/org/slf4j/Logger.html#debug(java.lang.String,%20java.lang.Object%2C%20java.lang.Object)">two
+ argument</a> variant is also available. For example, you can
+ write:</p>
<pre class="prettyprint source">logger.debug("The new entry is {}. It replaces {}.", entry, oldEntry);</pre>
<p>If three or more arguments need to be passed, you can make
- use of the <code>Object[]</code> variant. For example, you can
+ use of the <a
+ href="apidocs/org/slf4j/Logger.html#debug(java.lang.String%2C%20java.lang.Object...)"><code>Object...</code>
+ variant</a> of the printing methods. For example, you can
write:</p>
- <pre class="prettyprint source">logger.debug("Value {} was inserted between {} and {}.", new Object[] {newVal, below, above});</pre>
+ <pre class="prettyprint source">logger.debug("Value {} was inserted between {} and {}.", newVal, below, above);</pre>
+ <p>This form incurs the hidden cost of construction of an
+ Object[] (object array) which is usually very small. The one and
+ two argument variants do not incur this hidden cost and exist
+ solely for this reason (efficiency). The slf4j-api would be
+ smaller/cleaner with only the Object... variant.</p>
<p>Array type arguments, including multi-dimensional arrays,
diff --git a/slf4j-site/src/site/pages/manual.html b/slf4j-site/src/site/pages/manual.html
index ce4b5b6..a5aeeb6 100644
--- a/slf4j-site/src/site/pages/manual.html
+++ b/slf4j-site/src/site/pages/manual.html
@@ -35,6 +35,14 @@
implementation.
</p>
+ <p><span class="label">since 1.7.0</span> In order to support <a
+ href="http://docs.oracle.com/javase/1.5.0/docs/guide/language/varargs.html">varargs</a>,
+ SLF4J version 1.7.0 and later require JDK 1.5 or greater. Given
+ that under the hood, the Java compiler transforms the varaargs
+ part in methods into an array, SLF4J version 1.7.0 is 100% binary
+ compatible, i.e. indistinguishable, from SLF4J version 1.6.x.
+ </p>
+
<h3 class="doAnchor" name="hello_world">Hello World</h3>
<p>As customary in programming tradition, here is an example
@@ -419,8 +427,9 @@ 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. SLF4J will abort execution with a warning if no binding
- is present.
+ on. If SLF4J cannot find a binding on the class path it
+ will emit a signle warning message and default to
+ no-operation implementation.
</td>
</tr>
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html
index 88713a2..7ac1a61 100644
--- a/slf4j-site/src/site/pages/news.html
+++ b/slf4j-site/src/site/pages/news.html
@@ -29,7 +29,17 @@
<hr noshade="noshade" size="1"/>
- <h3>2012 - Release of SLF4J 1.6.7</h3>
+ <h3>6th of September, 2012 - Release of SLF4J 1.7.0</h3>
+
+ <p><span class="bold">SLF4J now requires JDK 1.5.</span></p>
+
+ <p>Printing methods in the <a href="">Logger</a> interface now
+ offers variants accepting <a
+ href="http://docs.oracle.com/javase/1.5.0/docs/guide/language/varargs.html">varargs</a>
+ instead of Object[]. Given that under the hood, the Java compiler
+ transforms varargs into an array, this change is totally 100%
+ no-ifs-or-buts backward compatible with all existing client
+ code. </p>
<p>The logger field (of type <code>java.util.logging.Logger</code>)
in <code>JDK14LoggerAdapter</code> is now marked as transient. This
-----------------------------------------------------------------------
Summary of changes:
integration/build.xml | 16 +-
slf4j-api/src/main/java/org/slf4j/Logger.java | 475 ++++++++++----------
.../java/org/slf4j/impl/StaticLoggerBinder.java | 2 +-
.../java/org/slf4j/impl/StaticLoggerBinder.java | 2 +-
.../java/org/slf4j/impl/StaticLoggerBinder.java | 2 +-
.../src/test/java/org/slf4j/InvocationTest.java | 2 +-
.../java/org/slf4j/impl/StaticLoggerBinder.java | 2 +-
.../java/org/slf4j/impl/StaticLoggerBinder.java | 2 +-
.../java/org/slf4j/impl/StaticLoggerBinder.java | 2 +-
slf4j-site/src/site/pages/faq.html | 35 +-
slf4j-site/src/site/pages/manual.html | 13 +-
slf4j-site/src/site/pages/news.html | 12 +-
12 files changed, 300 insertions(+), 265 deletions(-)
hooks/post-receive
--
SLF4J: Simple Logging Facade for Java
More information about the slf4j-dev
mailing list