AMQ-6884 - Replacing printStackTrace() with logging statement

This commit is contained in:
Christopher L. Shannon (cshannon) 2018-01-11 07:27:03 -05:00
parent 8c77e9553e
commit 4535e8f097
1 changed files with 7 additions and 2 deletions

View File

@ -24,8 +24,13 @@ import java.util.Set;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SelectorWorker implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(SelectorWorker.class);
private static final AtomicInteger NEXT_ID = new AtomicInteger();
final SelectorManager manager;
@ -73,7 +78,7 @@ public class SelectorWorker implements Runnable {
try {
task.run();
} catch (Throwable e) {
e.printStackTrace();
LOG.debug(e.getMessage(), e);
}
}
}
@ -142,7 +147,7 @@ public class SelectorWorker implements Runnable {
manager.onWorkerEmptyEvent(this);
selector.close();
} catch (IOException ignore) {
ignore.printStackTrace();
LOG.debug(ignore.getMessage(), ignore);
}
Thread.currentThread().setName(origName);
}