From bb8d04bea0c0c20338701aceffbbeceb7687e7bb Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 30 Sep 2008 21:36:51 +0000 Subject: [PATCH] Tone down verbose logging. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5404 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../presents/util/SafeObjectManager.as | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/as/com/threerings/presents/util/SafeObjectManager.as b/src/as/com/threerings/presents/util/SafeObjectManager.as index 2cf76ff60..718f5b9d1 100644 --- a/src/as/com/threerings/presents/util/SafeObjectManager.as +++ b/src/as/com/threerings/presents/util/SafeObjectManager.as @@ -38,17 +38,16 @@ public class SafeObjectManager /** * Creates a new manager. The optional available and failed parameters are callbacks * that must match the Subscriber interface methods. + * * @param omgr the underlying object manager to use for requesting objects * @param log sink for warnings and info messages * @param available optional callback for when an object becomes available * @param failed optional callback for when a subscription request fails + * * @see Subscriber */ public function SafeObjectManager ( - omgr :DObjectManager, - log :Log, - available :Function = null, - failed :Function = null) + omgr :DObjectManager, log :Log, available :Function = null, failed :Function = null) { _omgr = omgr; _log = log; @@ -70,9 +69,7 @@ public class SafeObjectManager * @param failed an optional callback to be invoked if the request fails */ public function subscribe ( - oid :int, - available :Function=null, - failed :Function=null) :void + oid :int, available :Function=null, failed :Function=null) :void { if (_entries[oid] != null ) { _log.warning("Object " + oid + " already subscribed"); @@ -84,7 +81,7 @@ public class SafeObjectManager entry.availableFn = available; entry.failedFn = failed; sub.subscribe(_omgr); - _log.info("Subscribing to " + sub); + // _log.info("Subscribing to " + sub); _entries[oid] = entry; } @@ -101,7 +98,7 @@ public class SafeObjectManager return; } - _log.info("Unsubscribing from " + entry.sub); + // _log.info("Unsubscribing from " + entry.sub); if (entry.obj != null) { entry.obj.removeListener(_objectDeathListenerAdapter); } @@ -118,7 +115,7 @@ public class SafeObjectManager */ public function unsubscribeAll () :void { - _log.info("Unsubscribing all objects"); + // _log.info("Unsubscribing all objects"); // get the keys (integer ids of subscribed objects) var ids :Array = new Array(); @@ -156,7 +153,7 @@ public class SafeObjectManager _log.warning("Object " + obj.getOid() + " available without request?!"); } else { - _log.info("Object " + obj.getOid() + " now available"); + // _log.info("Object " + obj.getOid() + " now available"); entry.obj = obj; } @@ -208,23 +205,20 @@ public class SafeObjectManager entry.obj = null; } - _log.info("Object " + oid + " destroyed"); + // _log.info("Object " + oid + " destroyed"); } protected var _omgr :DObjectManager; protected var _log :Log; protected var _available :Function; protected var _failed :Function; - protected var _adapter :SubscriberAdapter = - new SubscriberAdapter(available, failed); + protected var _adapter :SubscriberAdapter = new SubscriberAdapter(available, failed); protected var _objectDeathListenerAdapter :ObjectDeathListenerAdapter = new ObjectDeathListenerAdapter(destroyed); protected var _entries :Dictionary = new Dictionary(); } - } - import com.threerings.presents.dobj.DObject; import com.threerings.presents.dobj.ObjectDeathListener; import com.threerings.presents.dobj.ObjectDestroyedEvent;