Drive-by logging varargification.
Don't ask what I'm doing driving in this neighborhood. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5913 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -124,7 +124,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
{
|
{
|
||||||
// make sure the placeId is valid
|
// make sure the placeId is valid
|
||||||
if (placeId < 0) {
|
if (placeId < 0) {
|
||||||
log.warning("Refusing moveTo(): invalid placeId " + placeId + ".");
|
log.warning("Refusing moveTo(): invalid placeId", "placeId", placeId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,13 +142,13 @@ public class LocationDirector extends BasicDirector
|
|||||||
// if the pending request has been outstanding more than a minute, go ahead and let
|
// if the pending request has been outstanding more than a minute, go ahead and let
|
||||||
// this new one through in an attempt to recover from dropped moveTo requests
|
// this new one through in an attempt to recover from dropped moveTo requests
|
||||||
if (refuse) {
|
if (refuse) {
|
||||||
log.warning("Refusing moveTo; We have a request outstanding " +
|
log.warning("Refusing moveTo; We have a request outstanding",
|
||||||
"[ppid=" + _pendingPlaceId + ", npid=" + placeId + "].");
|
"ppid", _pendingPlaceId, "npid", placeId);
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.warning("Overriding stale moveTo request [ppid=" + _pendingPlaceId +
|
log.warning("Overriding stale moveTo request",
|
||||||
", npid=" + placeId + "].");
|
"ppid", _pendingPlaceId, "npid", placeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,14 +170,14 @@ public class LocationDirector extends BasicDirector
|
|||||||
var placeId :int = _pendingPlaceId;
|
var placeId :int = _pendingPlaceId;
|
||||||
_pendingPlaceId = -1;
|
_pendingPlaceId = -1;
|
||||||
|
|
||||||
log.info("moveTo failed [pid=" + placeId + ", reason=" + reason + "].");
|
log.info("moveTo failed", "pid", placeId, "reason", reason);
|
||||||
|
|
||||||
// let our observers know that something has gone horribly awry
|
// let our observers know that something has gone horribly awry
|
||||||
notifyFailure(placeId, reason);
|
notifyFailure(placeId, reason);
|
||||||
};
|
};
|
||||||
|
|
||||||
// issue a moveTo request
|
// issue a moveTo request
|
||||||
log.info("Issuing moveTo(" + placeId + ").");
|
log.info("Issuing moveTo", "placeId", placeId);
|
||||||
_lservice.moveTo(placeId, new MoveAdapter(success, failure));
|
_lservice.moveTo(placeId, new MoveAdapter(success, failure));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -267,8 +267,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
try {
|
try {
|
||||||
_controller.mayLeavePlace(_plobj);
|
_controller.mayLeavePlace(_plobj);
|
||||||
} catch (e :Error) {
|
} catch (e :Error) {
|
||||||
log.warning("Place controller choked in mayLeavePlace [plobj=" + _plobj + "].");
|
log.warning("Place controller choked in mayLeavePlace", "plobj", _plobj, e);
|
||||||
log.logStackTrace(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -304,7 +303,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
// check whether we should use a custom class loader
|
// check whether we should use a custom class loader
|
||||||
_controller = config.createController();
|
_controller = config.createController();
|
||||||
if (_controller == null) {
|
if (_controller == null) {
|
||||||
log.warning("Place config returned null controller [config=" + config + "].");
|
log.warning("Place config returned null controller", "config", config);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_controller.init(_cctx, config);
|
_controller.init(_cctx, config);
|
||||||
@@ -326,8 +325,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
try {
|
try {
|
||||||
_controller.didLeavePlace(_plobj);
|
_controller.didLeavePlace(_plobj);
|
||||||
} catch (e :Error) {
|
} catch (e :Error) {
|
||||||
log.warning("Place controller choked in didLeavePlace [plobj=" + _plobj + "].");
|
log.warning("Place controller choked in didLeavePlace", "plobj", _plobj, e);
|
||||||
log.logStackTrace(e);
|
|
||||||
}
|
}
|
||||||
_controller = null;
|
_controller = null;
|
||||||
}
|
}
|
||||||
@@ -391,8 +389,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
gotBodyObject(object as BodyObject);
|
gotBodyObject(object as BodyObject);
|
||||||
};
|
};
|
||||||
var failure :Function = function (oid :int, cause :ObjectAccessError) :void {
|
var failure :Function = function (oid :int, cause :ObjectAccessError) :void {
|
||||||
log.warning("Location director unable to fetch body object; all has gone horribly " +
|
log.warning("Unable to fetch body object; all has gone horribly wrong", cause);
|
||||||
"wrong [cause=" + cause + "].");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var client :Client = event.getClient();
|
var client :Client = event.getClient();
|
||||||
@@ -442,7 +439,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
// documentation inherited from interface
|
// documentation inherited from interface
|
||||||
public function forcedMove (placeId :int) :void
|
public function forcedMove (placeId :int) :void
|
||||||
{
|
{
|
||||||
log.info("Moving at request of server [placeId=" + placeId + "].");
|
log.info("Moving at request of server", "placeId", placeId);
|
||||||
|
|
||||||
if (!movePending()) {
|
if (!movePending()) {
|
||||||
// clear out our old place information
|
// clear out our old place information
|
||||||
@@ -465,8 +462,7 @@ public class LocationDirector extends BasicDirector
|
|||||||
try {
|
try {
|
||||||
_controller.willEnterPlace(_plobj);
|
_controller.willEnterPlace(_plobj);
|
||||||
} catch (e :Error) {
|
} catch (e :Error) {
|
||||||
log.warning("Controller choked in willEnterPlace [place=" + _plobj + "].");
|
log.warning("Controller choked in willEnterPlace", "place", _plobj, e);
|
||||||
log.logStackTrace(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,8 +477,8 @@ public class LocationDirector extends BasicDirector
|
|||||||
public function requestFailed (oid :int, cause :ObjectAccessError) :void
|
public function requestFailed (oid :int, cause :ObjectAccessError) :void
|
||||||
{
|
{
|
||||||
// aiya! we were unable to fetch our new place object; something is badly wrong
|
// aiya! we were unable to fetch our new place object; something is badly wrong
|
||||||
log.warning("Aiya! Unable to fetch place object for new location [plid=" + oid +
|
log.warning("Aiya! Unable to fetch place object for new location",
|
||||||
", reason=" + cause + "].");
|
"plid", oid, "reason", cause);
|
||||||
|
|
||||||
// clear out our half initialized place info
|
// clear out our half initialized place info
|
||||||
var placeId :int = _placeId;
|
var placeId :int = _placeId;
|
||||||
@@ -520,9 +516,9 @@ public class LocationDirector extends BasicDirector
|
|||||||
{
|
{
|
||||||
if (_failureHandler != null) {
|
if (_failureHandler != null) {
|
||||||
log.warning("Requested to set failure handler, but we've already got one. The " +
|
log.warning("Requested to set failure handler, but we've already got one. The " +
|
||||||
"conflicting entities will likely need to perform more sophisticated " +
|
"conflicting entities will likely need to perform more sophisticated " +
|
||||||
"coordination to deal with failures. [old=" + _failureHandler +
|
"coordination to deal with failures.",
|
||||||
", new=" + handler + "].");
|
"old", _failureHandler, "new", handler);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_failureHandler = handler;
|
_failureHandler = handler;
|
||||||
|
|||||||
Reference in New Issue
Block a user