You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2016/02/05 13:06:32 UTC

svn commit: r1728647 - /sling/trunk/bundles/extensions/serviceusermapper/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java

Author: bdelacretaz
Date: Fri Feb  5 12:06:31 2016
New Revision: 1728647

URL: http://svn.apache.org/viewvc?rev=1728647&view=rev
Log:
SLING-5484 - tweak debug logs

Modified:
    sling/trunk/bundles/extensions/serviceusermapper/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java

Modified: sling/trunk/bundles/extensions/serviceusermapper/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/serviceusermapper/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java?rev=1728647&r1=1728646&r2=1728647&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/serviceusermapper/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java (original)
+++ sling/trunk/bundles/extensions/serviceusermapper/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java Fri Feb  5 12:06:31 2016
@@ -240,7 +240,7 @@ public class ServiceUserMapperImpl imple
         }
 
         activeMappings = mappings.toArray(new Mapping[mappings.size()]);
-        log.debug("Active mappings updated: {}", mappings);
+        log.debug("Active mappings updated: {} mappings active", mappings.size());
 
         RegistrationSet registrationSet = updateServiceRegistrations(activeMappings);
 
@@ -358,7 +358,10 @@ public class ServiceUserMapperImpl imple
     }
 
     private String internalGetUserId(final String serviceName, final String subServiceName) {
-        // try with serviceInfo first
+        log.debug(
+                "internalGetUserId: {} active mappings, looking for mapping for {}/{}", 
+                new Object[] { this.activeMappings.length, serviceName, subServiceName });
+        
         for (final Mapping mapping : this.activeMappings) {
             final String userId = mapping.map(serviceName, subServiceName);
             if (userId != null) {
@@ -368,6 +371,10 @@ public class ServiceUserMapperImpl imple
         }
 
         // second round without serviceInfo
+        log.debug(
+                "internalGetUserId: {} active mappings, looking for mapping for {}/<no subServiceName>", 
+                this.activeMappings.length, serviceName);
+        
         for (Mapping mapping : this.activeMappings) {
             final String userId = mapping.map(serviceName, null);
             if (userId != null) {
@@ -376,7 +383,7 @@ public class ServiceUserMapperImpl imple
             }
         }
 
-        log.debug("No mapping found, fallback to default user [{}]", this.defaultUser);
+        log.debug("internalGetUserId: no mapping found, fallback to default user [{}]", this.defaultUser);
         return this.defaultUser;
     }