This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.serviceusermapper-1.2.6 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-serviceusermapper.git
commit ece541ce3e09f2b31d32dac81bf9899b06b292db Author: Bertrand Delacretaz <[email protected]> AuthorDate: Fri Feb 5 12:06:31 2016 +0000 SLING-5484 - tweak debug logs git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/serviceusermapper@1728647 13f79535-47bb-0310-9956-ffa450edef68 --- .../serviceusermapping/impl/ServiceUserMapperImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java b/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java index edd22dd..d4bc867 100644 --- a/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java +++ b/src/main/java/org/apache/sling/serviceusermapping/impl/ServiceUserMapperImpl.java @@ -240,7 +240,7 @@ public class ServiceUserMapperImpl implements ServiceUserMapper { } 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 implements ServiceUserMapper { } 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 implements ServiceUserMapper { } // 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 implements ServiceUserMapper { } } - 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; } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
