logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1382110 - in /logging/log4j/log4j2/trunk: pom.xml slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java src/changes/changes.xml
Date Fri, 07 Sep 2012 18:21:42 GMT
Author: rgoers
Date: Fri Sep  7 18:21:42 2012
New Revision: 1382110

URL: http://svn.apache.org/viewvc?rev=1382110&view=rev
Log:
Fix LOG4J2-80 - Add filtering to SLF4JLogger's log method

Modified:
    logging/log4j/log4j2/trunk/pom.xml
    logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml

Modified: logging/log4j/log4j2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/pom.xml?rev=1382110&r1=1382109&r2=1382110&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/pom.xml (original)
+++ logging/log4j/log4j2/trunk/pom.xml Fri Sep  7 18:21:42 2012
@@ -87,7 +87,7 @@
     <url>http://www.apache.org</url>
   </organization>
   <properties>
-    <slf4j.version>1.6.6</slf4j.version>
+    <slf4j.version>1.7.0</slf4j.version>
     <logback.version>1.0.7</logback.version>
     <log4jParentDir>${basedir}</log4jParentDir>
     <Log4jReleaseVersion>2.0-alpha3</Log4jReleaseVersion>

Modified: logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java?rev=1382110&r1=1382109&r2=1382110&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java (original)
+++ logging/log4j/log4j2/trunk/slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java Fri
Sep  7 18:21:42 2012
@@ -422,6 +422,9 @@ public class SLF4JLogger implements Loca
 
 
     public void log(Marker marker, String fqcn, int i, String s1, Object[] objects, Throwable
throwable) {
+        if (!logger.isEnabled(getLevel(i), (org.apache.logging.log4j.Marker) marker, s1))
{
+            return;
+        }
         Message msg;
         if (eventLogger && marker != null && marker.contains(EVENT_MARKER))
{
             try {

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1382110&r1=1382109&r2=1382110&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Fri Sep  7 18:21:42 2012
@@ -23,6 +23,10 @@
 
   <body>
     <release version="2.0-alpha3" date="TBD" description="">
+      <action issue="LOG4J2-80" dev="rgoers" type="fix" due-to="Oliver Lamy">
+        Allow Log4j 2 to be used as the implementation with SLF4J and SLF4J's jcl-over-slf4j
by adding filtering
+        to the log method in SLF4JLogger.
+      </action>
       <action issue="LOG4J2-78" dev="rgoers" type="fix">
         LogFactoryImpl.setAttribute in the Commons Logging bridge got a NullPointerException
when passed a null value.
         It will now remove the attribute.



Mime
View raw message