SLF4J License
+Licensing terms for SLF4J
SLF4J source code and binaries are distributed under the - following license. + MIT license.
From bugzilla-daemon at pixie.qos.ch Sun Aug 9 19:51:31 2009
From: bugzilla-daemon at pixie.qos.ch (bugzilla-daemon at pixie.qos.ch)
Date: Sun, 9 Aug 2009 19:51:31 +0200 (CEST)
Subject: [slf4j-dev] [Bug 144] New: Logger Interface Should (Arguably)
Extend Serializable
Message-ID:
Fixed bug
53 as reported by Heinrich Nirschl. The public method
trace(String)
in the Log4jLoggerAdapter
- class incorrecly called the underlying log4j logger with level DEBUG
+ class incorrectly called the underlying log4j logger with level DEBUG
instead of TRACE.
Fixed a syncroisation problem in factories of almost all SLF4J - bindings. This bug was reported independenly by Howard M. Lewis Ship +
Fixed a synchronization problem in factories of almost all SLF4J
+ bindings. This bug was reported independently by Howard M. Lewis Ship
and Boris Unkel in bug reports 26 and
respectively
References: <20090820122250.340132E456B@pixie.qos.ch>
Message-ID: <4A8D4178.9040505@qos.ch>
Hello all,
Given that git is in my opinion such a clearly better version control
system than Subversion, I migrated the SLF4J svn repository to git. It
was easier than expected.
There are two master repositories, one hosted at git.qos.ch and the
other hosted at github. For more information on these repositories,
please see http://www.slf4j.org/repos.html
I had hoped to keep the Subversion repository as a mirror, but it
appears that that would be too much of a hassle.
Your comments or questions are welcome.
--
Ceki G?lc?
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
From jukka.zitting at gmail.com Thu Aug 20 14:38:16 2009
From: jukka.zitting at gmail.com (Jukka Zitting)
Date: Thu, 20 Aug 2009 14:38:16 +0200
Subject: [slf4j-dev] Migrated to git
In-Reply-To: <4A8D4178.9040505@qos.ch>
References: <20090820122250.340132E456B@pixie.qos.ch> <4A8D4178.9040505@qos.ch>
Message-ID: <510143ac0908200538m20db7989v35df77c85f867d46@mail.gmail.com>
Hi,
On Thu, Aug 20, 2009 at 2:28 PM, Ceki Gulcu
+ * Please note that translating a java.util.logging event into SLF4J incurs the
+ * cost of constructing {@link LogRecord} instance regardless of whether the
+ * SLF4J logger is disabled for the given level. Consequently, j.u.l. to
+ * SLF4J translation can seriously impact on the cost of disabled logging
+ * statements (60 fold increase) and a measurable impact on enabled log
+ * statements (20% overall increase).
+ *
+ * If application performance is a concern, then use of SLF4JBridgeHandler is
+ * appropriate only if few j.u.l. logging statements are in play.
+ *
* @author Christian Stein
* @author Joern Huxhorn
* @author Ceki Gülcü
diff --git a/jul-to-slf4j/src/test/java/org/slf4j/bridge/SLF4JBridgeHandlerPerfTest.java b/jul-to-slf4j/src/test/java/org/slf4j/bridge/SLF4JBridgeHandlerPerfTest.java
index 0933696..ae7d25c 100644
--- a/jul-to-slf4j/src/test/java/org/slf4j/bridge/SLF4JBridgeHandlerPerfTest.java
+++ b/jul-to-slf4j/src/test/java/org/slf4j/bridge/SLF4JBridgeHandlerPerfTest.java
@@ -38,6 +38,10 @@ public class SLF4JBridgeHandlerPerfTest extends TestCase {
static String LOGGER_NAME = "yay";
static int RUN_LENGTH = 100*1000;
+
+ // set to false to test enabled logging performance
+ boolean disabledLogger = true;
+
FileAppender fileAppender;
org.apache.log4j.Logger log4jRoot;
java.util.logging.Logger julRootLogger = LogManager.getLogManager()
@@ -95,15 +99,17 @@ public class SLF4JBridgeHandlerPerfTest extends TestCase {
public void testPerf() {
SLF4JBridgeHandler.install();
- //log4jRoot.setLevel(org.apache.log4j.Level.ERROR);
-
+
+ if(disabledLogger) {
+ log4jRoot.setLevel(org.apache.log4j.Level.ERROR);
+ }
julLoggerLoop();
double julAvg=julLoggerLoop();
- System.out.println("Average cost per call (JUL->SLF4J->log4j):"+julAvg +" nanos");
+ System.out.println("Average cost per call (JUL->SLF4J->log4j): "+julAvg +" nanos");
slf4jLoggerLoop();
double slf4jAvg=slf4jLoggerLoop();
- System.out.println("Average cost per call (SLF4J->log4j):"+slf4jAvg +" nanos");
+ System.out.println("Average cost per call (SLF4J->log4j): "+slf4jAvg +" nanos");
System.out.println("Ratio "+(julAvg/slf4jAvg));
}
}
diff --git a/slf4j-site/src/site/pages/legacy.html b/slf4j-site/src/site/pages/legacy.html
index 327ab01..e729d82 100644
--- a/slf4j-site/src/site/pages/legacy.html
+++ b/slf4j-site/src/site/pages/legacy.html
@@ -193,14 +193,31 @@
The jul-to-slf4j module includes a jul handler, namely
SLF4JBridgeHandler, that routes all incoming jul records to the
- SLF4j API. See also SLF4JBridgeHandler
- javadocs. Contrary to other bridging modules such as
- jcl-over-slf4j and log4j-over-slf4j, which re-implement JCL and
- respectively log4j, the jul-to-slf4j modules does not re-implement
- the java.util.logging package because packages under the java.*
- namespace cannot be replaced.
+ javadocs
Contrary to other bridging modules such as jcl-over-slf4j and + log4j-over-slf4j, which re-implement JCL and respectively log4j, + the jul-to-slf4j modules does not re-implement the + java.util.logging package because packages under the java.* + namespace cannot be replaced. Instead, translates LogRecord into + their SLF4J equivalents. Please note that translating + java.util.logging events into SLF4J incurs the cost of + constructing LogRecord + instance regardless of whether the SLF4J logger is disabled for + the given level or nor. Consequently, j.u.l. to SLF4J translation + can seriously impact on the cost of disabled logging statements + (60 fold increase) and a measurable impact on enabled log + statements (20% overall increase). +
+ +If application performance is a concern, then use of + SLF4JBridgeHandler is appropriate only if few j.u.l. logging + statements are in play.
+SLF4J source code and binaries are distributed under the - following license. + MIT license.