incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amitg...@apache.org
Subject svn commit: r1521082 - /sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogConfigManager.java
Date Mon, 09 Sep 2013 12:57:04 GMT
Author: amitgupt
Date: Mon Sep  9 12:57:04 2013
New Revision: 1521082

URL: http://svn.apache.org/r1521082
Log:
SLING-3047 - Log message from other loggers get added to error.log

Applying patch from Chetan. Thanks.

Modified:
    sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogConfigManager.java

Modified: sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogConfigManager.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogConfigManager.java?rev=1521082&r1=1521081&r2=1521082&view=diff
==============================================================================
--- sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogConfigManager.java
(original)
+++ sling/trunk/bundles/commons/log/src/main/java/org/apache/sling/commons/log/logback/internal/LogConfigManager.java
Mon Sep  9 12:57:04 2013
@@ -244,6 +244,9 @@ public class LogConfigManager implements
                 ch.qos.logback.classic.Logger logger = loggerContext.getLogger(category);
                 logger.setLevel(config.getLogLevel());
                 if (appender != null) {
+                    //If an appender is explicitly defined then set additive to false
+                    //to be compatible with earlier Sling Logging behaviour
+                    logger.setAdditive(false);
                     logger.addAppender(appender);
                 }
             }



Mime
View raw message