Cleaning up more straining debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2803 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Log.java,v 1.1 2001/08/11 04:09:50 mdb Exp $
|
// $Id: Log.java,v 1.2 2003/09/22 23:57:20 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled;
|
package com.threerings.whirled;
|
||||||
|
|
||||||
@@ -12,6 +12,12 @@ public class Log
|
|||||||
public static com.samskivert.util.Log log =
|
public static com.samskivert.util.Log log =
|
||||||
new com.samskivert.util.Log("whirled");
|
new com.samskivert.util.Log("whirled");
|
||||||
|
|
||||||
|
/** Convenience function. */
|
||||||
|
public static boolean debug ()
|
||||||
|
{
|
||||||
|
return log.getLevel() == com.samskivert.util.Log.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
/** Convenience function. */
|
/** Convenience function. */
|
||||||
public static void debug (String message)
|
public static void debug (String message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SceneRegistry.java,v 1.18 2003/02/12 07:23:31 mdb Exp $
|
// $Id: SceneRegistry.java,v 1.19 2003/09/22 23:57:20 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.server;
|
package com.threerings.whirled.server;
|
||||||
|
|
||||||
@@ -137,7 +137,9 @@ public class SceneRegistry
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.debug("Resolving scene [id=" + sceneId + "].");
|
if (Log.debug()) {
|
||||||
|
Log.debug("Resolving scene [id=" + sceneId + "].");
|
||||||
|
}
|
||||||
|
|
||||||
// otherwise we've got to resolve the scene and call them back
|
// otherwise we've got to resolve the scene and call them back
|
||||||
// later; we can manipulate the penders table with impunity here
|
// later; we can manipulate the penders table with impunity here
|
||||||
@@ -160,7 +162,9 @@ public class SceneRegistry
|
|||||||
// keywords...
|
// keywords...
|
||||||
final int fsceneId = sceneId;
|
final int fsceneId = sceneId;
|
||||||
|
|
||||||
Log.debug("Invoking scene lookup [id=" + sceneId + "].");
|
if (Log.debug()) {
|
||||||
|
Log.debug("Invoking scene lookup [id=" + sceneId + "].");
|
||||||
|
}
|
||||||
|
|
||||||
// then we queue up an execution unit that'll load the scene
|
// then we queue up an execution unit that'll load the scene
|
||||||
// and initialize it and all that
|
// and initialize it and all that
|
||||||
@@ -262,8 +266,10 @@ public class SceneRegistry
|
|||||||
int sceneId = scmgr.getScene().getId();
|
int sceneId = scmgr.getScene().getId();
|
||||||
_scenemgrs.put(sceneId, scmgr);
|
_scenemgrs.put(sceneId, scmgr);
|
||||||
|
|
||||||
Log.debug("Registering scene manager [scid=" + sceneId +
|
if (Log.debug()) {
|
||||||
", scmgr=" + scmgr + "].");
|
Log.debug("Registering scene manager [scid=" + sceneId +
|
||||||
|
", scmgr=" + scmgr + "].");
|
||||||
|
}
|
||||||
|
|
||||||
// now notify any penders
|
// now notify any penders
|
||||||
ArrayList penders = (ArrayList)_penders.remove(sceneId);
|
ArrayList penders = (ArrayList)_penders.remove(sceneId);
|
||||||
@@ -288,7 +294,10 @@ public class SceneRegistry
|
|||||||
if (_scenemgrs.remove(scmgr.getScene().getId()) == null) {
|
if (_scenemgrs.remove(scmgr.getScene().getId()) == null) {
|
||||||
Log.warning("Requested to unmap unmapped scene manager " +
|
Log.warning("Requested to unmap unmapped scene manager " +
|
||||||
"[scmgr=" + scmgr + "].");
|
"[scmgr=" + scmgr + "].");
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Log.debug()) {
|
||||||
Log.debug("Unmapped scene manager " + scmgr + ".");
|
Log.debug("Unmapped scene manager " + scmgr + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user