mirror of https://github.com/apache/activemq.git
AMQ-6884 - Replacing printStackTrace() with logging statement
This commit is contained in:
parent
8c77e9553e
commit
4535e8f097
|
@ -24,8 +24,13 @@ import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class SelectorWorker implements Runnable {
|
public class SelectorWorker implements Runnable {
|
||||||
|
|
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(SelectorWorker.class);
|
||||||
|
|
||||||
private static final AtomicInteger NEXT_ID = new AtomicInteger();
|
private static final AtomicInteger NEXT_ID = new AtomicInteger();
|
||||||
|
|
||||||
final SelectorManager manager;
|
final SelectorManager manager;
|
||||||
|
@ -73,7 +78,7 @@ public class SelectorWorker implements Runnable {
|
||||||
try {
|
try {
|
||||||
task.run();
|
task.run();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
LOG.debug(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,7 +147,7 @@ public class SelectorWorker implements Runnable {
|
||||||
manager.onWorkerEmptyEvent(this);
|
manager.onWorkerEmptyEvent(this);
|
||||||
selector.close();
|
selector.close();
|
||||||
} catch (IOException ignore) {
|
} catch (IOException ignore) {
|
||||||
ignore.printStackTrace();
|
LOG.debug(ignore.getMessage(), ignore);
|
||||||
}
|
}
|
||||||
Thread.currentThread().setName(origName);
|
Thread.currentThread().setName(origName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue