Varargified log calls.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5697 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-03-26 00:02:19 +00:00
parent 647a25dfdc
commit 688f2580ed
46 changed files with 231 additions and 272 deletions
@@ -1017,8 +1017,8 @@ public class ChatDirector extends BasicDirector
if (bundle != null && _msgmgr != null) {
MessageBundle msgb = _msgmgr.getBundle(bundle);
if (msgb == null) {
log.warning("No message bundle available to translate message " +
"[bundle=" + bundle + ", message=" + message + "].");
log.warning("No message bundle available to translate message", "bundle", bundle,
"message", message);
} else {
message = msgb.xlate(message);
}
@@ -87,9 +87,8 @@ public class SpeakHandler
// ensure that the speaker is valid
if ((mode == ChatCodes.BROADCAST_MODE) ||
(_validator != null && !_validator.isValidSpeaker(_speakObj, caller, mode))) {
log.warning("Refusing invalid speak request [caller=" + caller.who() +
", speakObj=" + _speakObj.which() +
", message=" + message + ", mode=" + mode + "].");
log.warning("Refusing invalid speak request", "caller", caller.who(),
"speakObj", _speakObj.which(), "message", message, "mode", mode);
} else {
// issue the speak message on our speak object
@@ -194,8 +194,7 @@ public class SpeakUtil
_messageMapper.message = null;
} else {
log.info("Unable to note listeners [dclass=" + speakObj.getClass() +
", msg=" + msg + "].");
log.info("Unable to note listeners", "dclass", speakObj.getClass(), "msg", msg);
}
}
@@ -140,13 +140,13 @@ public class LocationDirector extends BasicDirector
// 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
if (refuse) {
log.warning("Refusing moveTo; We have a request outstanding " +
"[ppid=" + _pendingPlaceId + ", npid=" + placeId + "].");
log.warning("Refusing moveTo; We have a request outstanding",
"ppid", _pendingPlaceId, "npid", placeId);
return false;
} else {
log.warning("Overriding stale moveTo request [ppid=" + _pendingPlaceId +
", npid=" + placeId + "].");
log.warning("Overriding stale moveTo request", "ppid", _pendingPlaceId,
"npid", placeId);
}
}
@@ -166,7 +166,7 @@ public class LocationDirector extends BasicDirector
// clear out our pending request oid
int placeId = _pendingPlaceId;
_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
handleFailure(placeId, reason);
}
@@ -258,8 +258,7 @@ public class LocationDirector extends BasicDirector
try {
_controller.mayLeavePlace(_plobj);
} catch (Exception e) {
log.warning("Place controller choked in mayLeavePlace " +
"[plobj=" + _plobj + "].", e);
log.warning("Place controller choked in mayLeavePlace", "plobj", _plobj, e);
}
}
}
@@ -296,7 +295,7 @@ public class LocationDirector extends BasicDirector
try {
_controller = createController(config);
if (_controller == null) {
log.warning("Place config returned null controller [config=" + config + "].");
log.warning("Place config returned null controller", "config", config);
return;
}
_controller.init(_ctx, config);
@@ -308,8 +307,8 @@ public class LocationDirector extends BasicDirector
}
public void requestFailed (int oid, ObjectAccessException cause) {
// 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 +
", reason=" + cause + "].");
log.warning("Aiya! Unable to fetch place object for new location", "plid", oid,
"reason", cause);
// clear out our half initialized place info
int placeId = _placeId;
_placeId = -1;
@@ -320,7 +319,7 @@ public class LocationDirector extends BasicDirector
_subber.subscribe(_ctx.getDObjectManager());
} catch (Exception e) {
log.warning("Failed to create place controller [config=" + config + "].", e);
log.warning("Failed to create place controller", "config", config, e);
handleFailure(_placeId, LocationCodes.E_INTERNAL_ERROR);
}
}
@@ -343,8 +342,7 @@ public class LocationDirector extends BasicDirector
try {
_controller.didLeavePlace(_plobj);
} catch (Exception e) {
log.warning("Place controller choked in didLeavePlace " +
"[plobj=" + _plobj + "].", e);
log.warning("Place controller choked in didLeavePlace", "plobj", _plobj, e);
}
}
@@ -404,7 +402,7 @@ public class LocationDirector extends BasicDirector
}
public void requestFailed (int oid, ObjectAccessException cause) {
log.warning("Location director unable to fetch body object; all has gone " +
"horribly wrong [cause=" + cause + "].");
"horribly wrong", "cause", cause);
}
};
int cloid = client.getClientOid();
@@ -457,8 +455,7 @@ public class LocationDirector extends BasicDirector
try {
_controller.willEnterPlace(_plobj);
} catch (Exception e) {
log.warning("Controller choked in willEnterPlace " +
"[place=" + _plobj + "].", e);
log.warning("Controller choked in willEnterPlace", "place", _plobj, e);
}
}
@@ -479,12 +476,12 @@ public class LocationDirector extends BasicDirector
// just finish up what we're doing and assume that the repeated move request was the
// spurious one as it would be in the case of lag causing rapid-fire repeat requests
if (movePending()) {
log.info("Dropping forced move because we have a move pending " +
"[pendId=" + _pendingPlaceId + ", reqId=" + placeId + "].");
log.info("Dropping forced move because we have a move pending",
"pendId", _pendingPlaceId, "reqId", placeId);
return;
}
log.info("Moving at request of server [placeId=" + placeId + "].");
log.info("Moving at request of server", "placeId", placeId);
// clear out our old place information
mayLeavePlace();
didLeavePlace();
@@ -505,8 +502,8 @@ public class LocationDirector extends BasicDirector
if (_failureHandler != null) {
log.warning("Requested to set failure handler, but we've already got one. The " +
"conflicting entities will likely need to perform more sophisticated " +
"coordination to deal with failures. [old=" + _failureHandler +
", new=" + handler + "].");
"coordination to deal with failures.",
"old", _failureHandler, "new", handler);
} else {
_failureHandler = handler;
@@ -52,8 +52,8 @@ public class PlaceViewUtil
try {
((PlaceView)root).willEnterPlace(plobj);
} catch (Exception e) {
log.warning("Component choked on willEnterPlace() " +
"[component=" + root + ", plobj=" + plobj + "].", e);
log.warning("Component choked on willEnterPlace()", "component", root,
"plobj", plobj, e);
}
}
@@ -84,8 +84,8 @@ public class PlaceViewUtil
try {
((PlaceView)root).didLeavePlace(plobj);
} catch (Exception e) {
log.warning("Component choked on didLeavePlace() " +
"[component=" + root + ", plobj=" + plobj + "].", e);
log.warning("Component choked on didLeavePlace()", "component", root,
"plobj", plobj, e);
}
}
@@ -96,7 +96,7 @@ public class BodyManager
}
// update their status!
log.debug("Setting user idle state [user=" + bobj.username + ", status=" + nstatus + "].");
log.debug("Setting user idle state", "user", bobj.username, "status", nstatus);
updateOccupantStatus(bobj, nstatus);
}
@@ -81,8 +81,8 @@ public class LocationManager
// make sure the place in question actually exists
PlaceManager pmgr = _plreg.getPlaceManager(placeOid);
if (pmgr == null) {
log.info("Requested to move to non-existent place [who=" + source.who() +
", placeOid=" + placeOid + "].");
log.info("Requested to move to non-existent place", "who", source.who(),
"placeOid", placeOid);
throw new InvocationException(NO_SUCH_PLACE);
}
@@ -90,8 +90,8 @@ public class LocationManager
// because we don't need to update anything in distributed object world
Place place = pmgr.getLocation();
if (place.equals(source.location)) {
log.debug("Going along with client request to move to where they already are " +
"[source=" + source.who() + ", place=" + place + "].");
log.debug("Going along with client request to move to where they already are",
"source", source.who(), "place", place);
return pmgr.getConfig();
}
@@ -164,7 +164,7 @@ public class PlaceRegistry
try {
pmgr.shutdown();
} catch (Exception e) {
log.warning("Place manager failed shutting down [where=" + pmgr.where() + "].", e);
log.warning("Place manager failed shutting down", "where", pmgr.where(), e);
}
}
}
@@ -222,7 +222,7 @@ public class PlaceRegistry
pmgr.startup(plobj);
} catch (Exception e) {
log.warning("Error starting place manager [obj=" + plobj + ", pmgr=" + pmgr + "].", e);
log.warning("Error starting place manager", "obj", plobj, "pmgr", pmgr, e);
}
return pmgr;
@@ -258,7 +258,7 @@ public class PlaceRegistry
int ploid = pmgr.getPlaceObject().getOid();
// remove it from the table
if (_pmgrs.remove(ploid) == null) {
log.warning("Requested to unmap unmapped place manager [pmgr=" + pmgr + "].");
log.warning("Requested to unmap unmapped place manager", "pmgr", pmgr);
// } else {
// Log.info("Unmapped place manager [class=" + pmgr.getClass().getName() +