From 99bffa6ce0d3ea915a8d1723b9ee507b78ad4b6c Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 27 Jul 2012 09:23:58 -0700 Subject: [PATCH] Making QTP debug/info message conform to stack-trace & logging output rules to make debugging easier --- .../org/eclipse/jetty/util/thread/QueuedThreadPool.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java index 2a79e28ede7..5abb60be0c5 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java @@ -27,6 +27,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import org.eclipse.jetty.util.BlockingArrayQueue; +import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.component.AbstractLifeCycle; import org.eclipse.jetty.util.component.AggregateLifeCycle; import org.eclipse.jetty.util.component.Dumpable; @@ -143,17 +144,18 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo int size=_threads.size(); if (size>0) { - LOG.warn(size+" threads could not be stopped"); + LOG.warn("{} threads could not be stopped", size); if (size==1 || LOG.isDebugEnabled()) { for (Thread unstopped : _threads) { - LOG.info("Couldn't stop "+unstopped); + StringBuilder dmp = new StringBuilder(); for (StackTraceElement element : unstopped.getStackTrace()) { - LOG.info(" at "+element); + dmp.append(StringUtil.__LINE_SEPARATOR).append("\tat ").append(element); } + LOG.debug("Couldn't stop {}{}", unstopped, dmp.toString()); } } }