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;
|
package com.threerings.crowd;
|
||||||
|
|
||||||
@@ -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("crowd");
|
new com.samskivert.util.Log("crowd");
|
||||||
|
|
||||||
|
/** 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: 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;
|
package com.threerings.crowd.server;
|
||||||
|
|
||||||
@@ -368,7 +368,10 @@ public class PlaceManager
|
|||||||
*/
|
*/
|
||||||
protected void bodyEntered (final int bodyOid)
|
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
|
// let our delegates know what's up
|
||||||
applyToDelegates(new DelegateOp() {
|
applyToDelegates(new DelegateOp() {
|
||||||
@@ -386,7 +389,10 @@ public class PlaceManager
|
|||||||
*/
|
*/
|
||||||
protected void bodyLeft (final int bodyOid)
|
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
|
// if their occupant info hasn't been removed (which may be the
|
||||||
// case if they logged off rather than left via a MoveTo request),
|
// case if they logged off rather than left via a MoveTo request),
|
||||||
|
|||||||
Reference in New Issue
Block a user