incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r886104 - /sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLogger.java
Date Wed, 02 Dec 2009 10:30:26 GMT
Author: fmeschbe
Date: Wed Dec  2 10:30:19 2009
New Revision: 886104

URL: http://svn.apache.org/viewvc?rev=886104&view=rev
Log:
SLING-1217 Apply patch supplied by Marc Speck (thanks alot) preventing NPE when disablig loggers.

Modified:
    sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLogger.java

Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLogger.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLogger.java?rev=886104&r1=886103&r2=886104&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLogger.java
(original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLogger.java
Wed Dec  2 10:30:19 2009
@@ -194,6 +194,9 @@
                 REQUEST_LOG_ENTRY_FORMAT, requestLogName, requestLogType);
             this.requestLogExit = this.createRequestLoggerService(bundleContext, false,
                 REQUEST_LOG_EXIT_FORMAT, requestLogName, requestLogType);
+            
+            this.bindRequestLoggerService(this.requestLogEntry);
+            this.bindRequestLoggerService(this.requestLogExit);
         }
 
         // prepare the access logger if a name is configured and the
@@ -207,12 +210,9 @@
 
             this.accessLog = this.createRequestLoggerService(bundleContext, false,
                 ACCESS_LOG_FORMAT, accessLogName, accessLogType);
-        }
 
-        // finally have the loggers added to the respective lists for later use
-        this.bindRequestLoggerService(this.requestLogEntry);
-        this.bindRequestLoggerService(this.requestLogExit);
-        this.bindRequestLoggerService(this.accessLog);
+            this.bindRequestLoggerService(this.accessLog);
+        }
     }
 
     /**



Mime
View raw message