You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2022/11/02 07:41:31 UTC
[sling-org-apache-sling-resourceresolver] branch master updated: SLING-11604: Async VanityPathInitializer should log when completed (#85)
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
The following commit(s) were added to refs/heads/master by this push:
new 8c0138f SLING-11604: Async VanityPathInitializer should log when completed (#85)
8c0138f is described below
commit 8c0138f0da613c79ed513878f168c8b734ab33a9
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Wed Nov 2 08:41:26 2022 +0100
SLING-11604: Async VanityPathInitializer should log when completed (#85)
* SLING-11604: Async VanityPathInitializer should log when completed
* SLING-11604: Async VanityPathInitializer should log when completed (adjust log level)
* SLING-11604: Async VanityPathInitializer should log when completed (adjust log message)
---
.../apache/sling/resourceresolver/impl/mapping/MapEntries.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
index c23fc84..178fdce 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
@@ -329,7 +329,8 @@ public class MapEntries implements
try (ResourceResolver resolver = factory
.getServiceResourceResolver(factory.getServiceUserAuthenticationInfo("mapping"))) {
- log.debug("vanity path init - start");
+ long initStart = System.nanoTime();
+ log.debug("vanity path initialization - start");
vanityTargets = loadVanityPaths(resolver);
@@ -341,9 +342,10 @@ public class MapEntries implements
// drain once more in case more events have arrived
drainQueue(resourceChangeQueue);
- log.debug("vanity path init - end");
+ long initElapsed = System.nanoTime() - initStart;
+ log.info("vanity path initialization - end, elapsed {}ms", TimeUnit.NANOSECONDS.toMillis(initElapsed));
} catch (LoginException ex) {
- log.error("VanityPath init failed", ex);
+ log.error("Vanity path init failed", ex);
} finally {
log.debug("dropping temporary resolver map - {}/{} entries, {} hits, {} misses", temporaryResolveMapsMap.size(),
SIZELIMIT, temporaryResolveMapsMapHits.get(), temporaryResolveMapsMapMisses.get());