Thread.dumpStack() circumvents whatever logging is configured and writes
directly to stderr. Logging an exception with the associated warning does the right thing and logs the stack trace via the logging system. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5318 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -847,16 +847,14 @@ public class ConnectionManager extends LoopingThread
|
||||
{
|
||||
// sanity check
|
||||
if (conn == null || msg == null) {
|
||||
log.warning("postMessage() bogosity [conn=" + conn + ", msg=" + msg + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("postMessage() bogosity", "conn", conn, "msg", msg, new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
// more sanity check; messages must only be posted from the dobjmgr thread
|
||||
if (!_omgr.isDispatchThread()) {
|
||||
log.warning("Message posted on non-distributed object thread [conn=" + conn +
|
||||
", msg=" + msg + ", thread=" + Thread.currentThread() + "].");
|
||||
Thread.dumpStack();
|
||||
log.warning("Message posted on non-distributed object thread", "conn", conn,
|
||||
"msg", msg, "thread", Thread.currentThread(), new Exception());
|
||||
// let it through though as we don't want to break things unnecessarily
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user