Supress extra debuggy logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4169 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -26,7 +26,10 @@ public class FrameReader extends EventDispatcher
|
|||||||
*/
|
*/
|
||||||
protected function socketHasData (event :ProgressEvent) :void
|
protected function socketHasData (event :ProgressEvent) :void
|
||||||
{
|
{
|
||||||
Log.getLog(this).debug("socketHasData(" + _socket.bytesAvailable + ")");
|
if (ObjectInputStream.DEBUG) {
|
||||||
|
Log.getLog(this).debug(
|
||||||
|
"socketHasData(" + _socket.bytesAvailable + ")");
|
||||||
|
}
|
||||||
if (_curData == null) {
|
if (_curData == null) {
|
||||||
if (_socket.bytesAvailable < HEADER_SIZE) {
|
if (_socket.bytesAvailable < HEADER_SIZE) {
|
||||||
// if there are less bytes available than a header, let's
|
// if there are less bytes available than a header, let's
|
||||||
@@ -52,7 +55,9 @@ public class FrameReader extends EventDispatcher
|
|||||||
if (_length === _curData.length) {
|
if (_length === _curData.length) {
|
||||||
// we have now read a complete frame, let us dispatch the data
|
// we have now read a complete frame, let us dispatch the data
|
||||||
_curData.position = 0; // move the read pointer to the beginning
|
_curData.position = 0; // move the read pointer to the beginning
|
||||||
Log.getLog(this).debug("+ FrameAvailable");
|
if (ObjectInputStream.DEBUG) {
|
||||||
|
Log.getLog(this).debug("+ FrameAvailable");
|
||||||
|
}
|
||||||
dispatchEvent(new FrameAvailableEvent(_curData));
|
dispatchEvent(new FrameAvailableEvent(_curData));
|
||||||
_curData = null; // clear, so we know we need to first read length
|
_curData = null; // clear, so we know we need to first read length
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class ObjectInputStream
|
|||||||
|
|
||||||
// a zero code indicates a null value
|
// a zero code indicates a null value
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
log.debug(DEBUG_ID + "Read null");
|
if (DEBUG) log.debug(DEBUG_ID + "Read null");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,11 +61,12 @@ public class ObjectInputStream
|
|||||||
|
|
||||||
cmap = new ClassMapping(code, cname, streamer);
|
cmap = new ClassMapping(code, cname, streamer);
|
||||||
_classMap[code] = cmap;
|
_classMap[code] = cmap;
|
||||||
log.debug(DEBUG_ID +
|
if (DEBUG) log.debug(DEBUG_ID +
|
||||||
"Created mapping: (" + code + "): " + cname);
|
"Created mapping: (" + code + "): " + cname);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.debug(DEBUG_ID + "Read known code: (" + code + ")");
|
if (DEBUG) log.debug(
|
||||||
|
DEBUG_ID + "Read known code: (" + code + ")");
|
||||||
cmap = (_classMap[code] as ClassMapping);
|
cmap = (_classMap[code] as ClassMapping);
|
||||||
if (null == cmap) {
|
if (null == cmap) {
|
||||||
throw new IOError("Read object for which we have no " +
|
throw new IOError("Read object for which we have no " +
|
||||||
@@ -84,7 +85,7 @@ public class ObjectInputStream
|
|||||||
}
|
}
|
||||||
//log.debug("Reading object...");
|
//log.debug("Reading object...");
|
||||||
readBareObjectImpl(target, cmap.streamer);
|
readBareObjectImpl(target, cmap.streamer);
|
||||||
log.debug(DEBUG_ID + "Read object: " + target);
|
if (DEBUG) log.debug(DEBUG_ID + "Read object: " + target);
|
||||||
return target;
|
return target;
|
||||||
|
|
||||||
} catch (me :MemoryError) {
|
} catch (me :MemoryError) {
|
||||||
@@ -233,7 +234,7 @@ public class ObjectInputStream
|
|||||||
protected var _classMap :Array = new Array();
|
protected var _classMap :Array = new Array();
|
||||||
|
|
||||||
|
|
||||||
|
public static const DEBUG :Boolean = false;
|
||||||
private static var _tempy :int = 0;
|
private static var _tempy :int = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user