More debug log wrapping.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2804 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: Log.java,v 1.2 2001/10/11 04:07:51 mdb Exp $
|
||||
// $Id: Log.java,v 1.3 2003/09/22 23:59:39 mdb Exp $
|
||||
|
||||
package com.threerings.crowd;
|
||||
|
||||
@@ -12,6 +12,12 @@ public class Log
|
||||
public static com.samskivert.util.Log log =
|
||||
new com.samskivert.util.Log("crowd");
|
||||
|
||||
/** 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: PlaceManager.java,v 1.47 2003/08/20 01:54:57 mdb Exp $
|
||||
// $Id: PlaceManager.java,v 1.48 2003/09/22 23:59:39 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.server;
|
||||
|
||||
@@ -368,7 +368,10 @@ public class PlaceManager
|
||||
*/
|
||||
protected void bodyEntered (final int bodyOid)
|
||||
{
|
||||
Log.debug("Body entered [where=" + where() + ", oid=" + bodyOid + "].");
|
||||
if (Log.debug()) {
|
||||
Log.debug("Body entered [where=" + where() +
|
||||
", oid=" + bodyOid + "].");
|
||||
}
|
||||
|
||||
// let our delegates know what's up
|
||||
applyToDelegates(new DelegateOp() {
|
||||
@@ -386,7 +389,10 @@ public class PlaceManager
|
||||
*/
|
||||
protected void bodyLeft (final int bodyOid)
|
||||
{
|
||||
Log.debug("Body left [where=" + where() + ", oid=" + bodyOid + "].");
|
||||
if (Log.debug()) {
|
||||
Log.debug("Body left [where=" + where() +
|
||||
", oid=" + bodyOid + "].");
|
||||
}
|
||||
|
||||
// if their occupant info hasn't been removed (which may be the
|
||||
// case if they logged off rather than left via a MoveTo request),
|
||||
|
||||
Reference in New Issue
Block a user