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:
Michael Bayne
2003-09-22 23:57:20 +00:00
parent 0d890bc8c4
commit d675a1612e
2 changed files with 22 additions and 7 deletions
+7 -1
View File
@@ -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;
@@ -12,6 +12,12 @@ public class Log
public static com.samskivert.util.Log log =
new com.samskivert.util.Log("whirled");
/** Convenience function. */
public static boolean debug ()
{
return log.getLevel() == com.samskivert.util.Log.DEBUG;
}
/** Convenience function. */
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;
@@ -137,7 +137,9 @@ public class SceneRegistry
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
// later; we can manipulate the penders table with impunity here
@@ -160,7 +162,9 @@ public class SceneRegistry
// keywords...
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
// and initialize it and all that
@@ -262,8 +266,10 @@ public class SceneRegistry
int sceneId = scmgr.getScene().getId();
_scenemgrs.put(sceneId, scmgr);
Log.debug("Registering scene manager [scid=" + sceneId +
", scmgr=" + scmgr + "].");
if (Log.debug()) {
Log.debug("Registering scene manager [scid=" + sceneId +
", scmgr=" + scmgr + "].");
}
// now notify any penders
ArrayList penders = (ArrayList)_penders.remove(sceneId);
@@ -288,7 +294,10 @@ public class SceneRegistry
if (_scenemgrs.remove(scmgr.getScene().getId()) == null) {
Log.warning("Requested to unmap unmapped scene manager " +
"[scmgr=" + scmgr + "].");
} else {
return;
}
if (Log.debug()) {
Log.debug("Unmapped scene manager " + scmgr + ".");
}
}