incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r933302 - /sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java
Date Mon, 12 Apr 2010 16:20:24 GMT
Author: justin
Date: Mon Apr 12 16:20:24 2010
New Revision: 933302

URL: http://svn.apache.org/viewvc?rev=933302&view=rev
Log:
SLING-1484 - only passing throwable to ServletContext.log() if non-null

Modified:
    sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java

Modified: sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java?rev=933302&r1=933301&r2=933302&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java
(original)
+++ sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java
Mon Apr 12 16:20:24 2010
@@ -196,6 +196,7 @@ public class SlingServletDelegate extend
             Map<String, String> props = loadConfigProperties(slingHome);
 
             Logger logger = new ServletContextLogger(getServletContext());
+            logger.log(Logger.LOG_ERROR, "msg without exception");
             ResourceProvider rp = new ServletContextResourceProvider(
                 getServletContext());
             tmpSling = new SlingBridge(notifiable, logger, rp, props, getServletContext());
@@ -434,7 +435,11 @@ public class SlingServletDelegate extend
                     servletContext.log("DEBUG: " + s);
                     break;
                 case LOG_ERROR:
-                    servletContext.log("ERROR: " + s, throwable);
+                    if (throwable == null) {
+                        servletContext.log("ERROR: " + s);
+                    } else {
+                        servletContext.log("ERROR: " + s, throwable);
+                    }
                     break;
                 case LOG_INFO:
                     servletContext.log("INFO: " + s);



Mime
View raw message