This is an automated email from the ASF dual-hosted git repository.

jsedding pushed a commit to branch testing/extra-logging
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git


The following commit(s) were added to refs/heads/testing/extra-logging by this 
push:
     new 0512f52  more logging
0512f52 is described below

commit 0512f523fcee564eb113efb953a904cfa5bb36e9
Author: Julian Sedding <[email protected]>
AuthorDate: Mon Oct 16 18:24:15 2023 +0200

    more logging
---
 .../apache/sling/resourceresolver/impl/FactoryRegistrationHandler.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/FactoryRegistrationHandler.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/FactoryRegistrationHandler.java
index 3627f5e..05e46a1 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/FactoryRegistrationHandler.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/FactoryRegistrationHandler.java
@@ -64,7 +64,7 @@ public class FactoryRegistrationHandler implements 
AutoCloseable {
         final String originalThreadName = Thread.currentThread().getName();
         this.factoryRegistrationWorker = Executors.newSingleThreadExecutor(
                 r -> {
-                    final Thread thread = new Thread(r, originalThreadName + 
"|" + ResourceResolverFactory.class.getSimpleName() + " 
registration/deregistration");
+                    final Thread thread = new Thread(r, originalThreadName + 
"|async|" + ResourceResolverFactory.class.getSimpleName() + " 
registration/deregistration");
                     thread.setUncaughtExceptionHandler((t, e) -> 
LOG.warn("Uncaught exception in thread '{}'", t.getName(), e));
                     return thread;
                 });
@@ -99,6 +99,7 @@ public class FactoryRegistrationHandler implements 
AutoCloseable {
 
     @Override
     public void close() {
+        LOG.info("Closing FactoryRegistrationHandler", new Exception("closing 
stacktrace"));
         factoryRegistrationWorker.shutdown();
         try {
             if (!factoryRegistrationWorker.awaitTermination(1, 
TimeUnit.MINUTES)) {

Reply via email to