incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r814606 - in /sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal: SlingServletResolver.java resource/ServletResourceProvider.java
Date Mon, 14 Sep 2009 12:21:45 GMT
Author: bdelacretaz
Date: Mon Sep 14 12:21:45 2009
New Revision: 814606

URL: http://svn.apache.org/viewvc?rev=814606&view=rev
Log:
Improved logging of servlet registrations

Modified:
    sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
    sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProvider.java

Modified: sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java?rev=814606&r1=814605&r2=814606&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
(original)
+++ sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
Mon Sep 14 12:21:45 2009
@@ -732,6 +732,7 @@
         ServiceRegistration reg = context.getBundleContext().registerService(
             ResourceProvider.SERVICE_NAME, provider, params);
 
+        log.info("Registered {}", provider.toString());
         servletsByReference.put(reference, reg);
 
         return true;

Modified: sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProvider.java?rev=814606&r1=814605&r2=814606&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProvider.java
(original)
+++ sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProvider.java
Mon Sep 14 12:21:45 2009
@@ -18,6 +18,7 @@
  */
 package org.apache.sling.servlets.resolver.internal.resource;
 
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.Set;
 
@@ -71,5 +72,12 @@
     public String[] getSerlvetPaths() {
         return resourcePaths.toArray(new String[resourcePaths.size()]);
     }
-
+    
+    /** Return suitable info for logging */
+    @Override
+    public String toString() {
+    	return getClass().getSimpleName() 
+    	+ ": servlet=" + servlet.getClass().getName() 
+    	+ ", paths=" + Arrays.asList(resourcePaths);
+    }
 }



Mime
View raw message