Switch to new samskivert logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5134 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -36,9 +36,10 @@ import com.samskivert.util.StringUtil;
|
||||
import com.threerings.io.Streamable;
|
||||
import com.threerings.util.TrackedObject;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
import com.threerings.presents.net.Transport;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* The distributed object forms the foundation of the Presents system. All information shared among
|
||||
* users of the system is done via distributed objects. A distributed object has a set of
|
||||
@@ -164,8 +165,8 @@ public class DObject
|
||||
_scount++;
|
||||
|
||||
} else {
|
||||
Log.warning("Refusing subscriber that's already in the list [dobj=" + which() +
|
||||
", subscriber=" + sub + "]");
|
||||
log.warning("Refusing subscriber that's already in the list", "dobj", which(),
|
||||
"subscriber", sub);
|
||||
Thread.dumpStack();
|
||||
}
|
||||
}
|
||||
@@ -225,7 +226,7 @@ public class DObject
|
||||
if (els != null) {
|
||||
_listeners = els;
|
||||
} else {
|
||||
Log.warning("Refusing repeat listener registration [dobj=" + which() +
|
||||
log.warning("Refusing repeat listener registration [dobj=" + which() +
|
||||
", list=" + listener + "]");
|
||||
Thread.dumpStack();
|
||||
}
|
||||
@@ -357,7 +358,7 @@ public class DObject
|
||||
// clear the lock from the list
|
||||
if (ListUtil.clear(_locks, name) == null) {
|
||||
// complain if we didn't find the lock
|
||||
Log.info("Unable to clear non-existent lock [lock=" + name + ", dobj=" + this + "].");
|
||||
log.info("Unable to clear non-existent lock [lock=" + name + ", dobj=" + this + "].");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,9 +439,8 @@ public class DObject
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.warning("Listener choked during notification [list=" + listener +
|
||||
", event=" + event + "].");
|
||||
Log.logStackTrace(e);
|
||||
log.warning("Listener choked during notification [list=" + listener +
|
||||
", event=" + event + "].", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -464,9 +464,7 @@ public class DObject
|
||||
((ProxySubscriber)sub).eventReceived(event);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.warning("Proxy choked during notification [sub=" + sub +
|
||||
", event=" + event + "].");
|
||||
Log.logStackTrace(e);
|
||||
log.warning("Proxy choked during notification", "sub", sub, "event", event, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -555,7 +553,7 @@ public class DObject
|
||||
_omgr.postEvent(event);
|
||||
|
||||
} else {
|
||||
Log.info("Dropping event for non- or no longer managed object [oid=" + getOid() +
|
||||
log.info("Dropping event for non- or no longer managed object [oid=" + getOid() +
|
||||
", class=" + getClass().getName() + ", event=" + event + "].");
|
||||
}
|
||||
}
|
||||
@@ -734,7 +732,7 @@ public class DObject
|
||||
{
|
||||
// sanity check
|
||||
if (_tcount != 0) {
|
||||
Log.warning("Transaction cleared with non-zero nesting count [dobj=" + this + "].");
|
||||
log.warning("Transaction cleared with non-zero nesting count", "dobj", this);
|
||||
_tcount = 0;
|
||||
}
|
||||
|
||||
@@ -827,7 +825,7 @@ public class DObject
|
||||
if (_omgr != null && _omgr.isManager(this)) {
|
||||
oldEntry = set.removeKey(key);
|
||||
if (oldEntry == null) {
|
||||
Log.warning("Requested to remove non-element [set=" + name + ", key=" + key + "].");
|
||||
log.warning("Requested to remove non-element", "set", name, "key", key);
|
||||
Thread.dumpStack();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.io.Streamable;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* The distributed set class provides a means by which an unordered set of objects can be
|
||||
@@ -199,7 +199,7 @@ public class DSet<E extends DSet.Entry>
|
||||
// the crazy sanity checks
|
||||
if (_size < 0 ||_size > _entries.length ||
|
||||
(_size > 0 && _entries[_size-1] == null)) {
|
||||
Log.warning("DSet in a bad way [size=" + _size +
|
||||
log.warning("DSet in a bad way [size=" + _size +
|
||||
", entries=" + StringUtil.toString(_entries) + "].");
|
||||
Thread.dumpStack();
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public class DSet<E extends DSet.Entry>
|
||||
throw new ConcurrentModificationException();
|
||||
}
|
||||
if (_ssize != _size) {
|
||||
Log.warning("Size changed during iteration [ssize=" + _ssize +
|
||||
log.warning("Size changed during iteration [ssize=" + _ssize +
|
||||
", nsize=" + _size +
|
||||
", entsries=" + StringUtil.toString(_entries) + "].");
|
||||
Thread.dumpStack();
|
||||
@@ -273,7 +273,7 @@ public class DSet<E extends DSet.Entry>
|
||||
|
||||
// if the element is already in the set, bail now
|
||||
if (eidx >= 0) {
|
||||
Log.warning("Refusing to add duplicate entry [entry=" + elem + ", set=" + this + "].");
|
||||
log.warning("Refusing to add duplicate entry [entry=" + elem + ", set=" + this + "].");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public class DSet<E extends DSet.Entry>
|
||||
if (_size >= elength) {
|
||||
// sanity check
|
||||
if (elength > 2048) {
|
||||
Log.warning("Requested to expand to questionably large size [l=" + elength + "].");
|
||||
log.warning("Requested to expand to questionably large size [l=" + elength + "].");
|
||||
Thread.dumpStack();
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ public class DSet<E extends DSet.Entry>
|
||||
{
|
||||
// don't fail, but generate a warning if we're passed a null key
|
||||
if (key == null) {
|
||||
Log.warning("Requested to remove null key.");
|
||||
log.warning("Requested to remove null key.");
|
||||
Thread.dumpStack();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ package com.threerings.presents.dobj;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.samskivert.util.MethodFinder;
|
||||
import com.samskivert.util.StringUtil;
|
||||
@@ -110,7 +109,7 @@ public class DynamicListener
|
||||
try {
|
||||
method.invoke(_target, arguments);
|
||||
} catch (Exception e) {
|
||||
log.log(Level.WARNING, "Failed to dispatch event callback " +
|
||||
log.warning("Failed to dispatch event callback " +
|
||||
name + "(" + StringUtil.toString(arguments) + ").", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ package com.threerings.presents.dobj;
|
||||
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* An entry added event is dispatched when an entry is added to a {@link DSet} attribute of a
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
package com.threerings.presents.dobj;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* An entry removed event is dispatched when an entry is removed from a {@link DSet} attribute of a
|
||||
@@ -88,7 +88,7 @@ public class EntryRemovedEvent<T extends DSet.Entry> extends NamedEvent
|
||||
_oldEntry = set.removeKey(_key);
|
||||
if (_oldEntry == null) {
|
||||
// complain if there was actually nothing there
|
||||
Log.warning("No matching entry to remove [key=" + _key + ", set=" + set + "].");
|
||||
log.warning("No matching entry to remove [key=" + _key + ", set=" + set + "].");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ package com.threerings.presents.dobj;
|
||||
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
|
||||
import com.threerings.presents.net.Transport;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
/**
|
||||
* An entry updated event is dispatched when an entry of a {@link DSet} is updated. It can also be
|
||||
* constructed to request the update of an entry and posted to the dobjmgr.
|
||||
@@ -107,7 +107,7 @@ public class EntryUpdatedEvent<T extends DSet.Entry> extends NamedEvent
|
||||
_oldEntry = set.update(_entry);
|
||||
if (_oldEntry == null) {
|
||||
// complain if we didn't update anything
|
||||
Log.warning("No matching entry to update [entry=" + this + ", set=" + set + "].");
|
||||
log.warning("No matching entry to update [entry=" + this + ", set=" + set + "].");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user