Author: cziegeler
Date: Tue Dec  9 09:23:28 2008
New Revision: 724788

URL: http://svn.apache.org/viewvc?rev=724788&view=rev
Log:
Add more logging to easier detect pool problems.

Modified:
    
incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPool.java

Modified: 
incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPool.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPool.java?rev=724788&r1=724787&r2=724788&view=diff
==============================================================================
--- 
incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPool.java
 (original)
+++ 
incubator/sling/trunk/commons/threads/src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPool.java
 Tue Dec  9 09:23:28 2008
@@ -159,7 +159,14 @@
             throw new IllegalStateException("Thread pool " + this.name + " is 
already shutdown.");
         }
         if ( runnable != null ) {
-            this.logger.debug("Executing runnable: {},pool={}", runnable, 
this.name);
+            if ( this.logger.isDebugEnabled() ) {
+                this.logger.debug("Executing runnable: {}, pool={}, 
corePoolSize={}, maxPoolSize={}, queueSize={}",
+                        new Object[] {runnable,
+                                      this.name,
+                                      this.executor.getCorePoolSize(),
+                                      this.executor.getMaximumPoolSize(),
+                                      this.executor.getQueue().size()});
+            }
 
                this.executor.execute(runnable);
         }


Reply via email to