Updated Branches: refs/heads/4.1 1fbda5d17 -> d592ea10b
CLOUDSTACK-1124 [EC2 Query API] Improve the logging. Having empty response objects is harmless to functionality This is observed in the awsapi.log for all Describe* EC2 commands when the response object returned by CS has no elements. But with EC2DescribeImages command it is always observed. This is because every time DescribeImage is fired, we call CS listTemplates command multiple times, each time setting a different value for the templateFilter parameter (e.g. featured, executable, community etc.). And for some of these CS calls made we obtain am empty response and hence the message in the logs. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/d592ea10 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/d592ea10 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/d592ea10 Branch: refs/heads/4.1 Commit: d592ea10bd208489a42bc9108c0055924c45b467 Parents: 1fbda5d Author: Likitha Shetty <[email protected]> Authored: Mon Feb 11 11:49:52 2013 -0800 Committer: Prachi Damle <[email protected]> Committed: Mon Feb 11 11:59:40 2013 -0800 ---------------------------------------------------------------------- awsapi/src/com/cloud/stack/CloudStackClient.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d592ea10/awsapi/src/com/cloud/stack/CloudStackClient.java ---------------------------------------------------------------------- diff --git a/awsapi/src/com/cloud/stack/CloudStackClient.java b/awsapi/src/com/cloud/stack/CloudStackClient.java index 5002aa5..5017bd4 100644 --- a/awsapi/src/com/cloud/stack/CloudStackClient.java +++ b/awsapi/src/com/cloud/stack/CloudStackClient.java @@ -151,7 +151,8 @@ public class CloudStackClient { return (new Gson()).fromJson(json.eval(responseName + "." + responseObjName), collectionType); } catch(Exception e) { // this happens because responseObjName won't exist if there are no objects in the list. - logger.debug("Unable to find responseObjName:[" + responseObjName + "]. Returning null! Exception: " + e.getMessage()); + logger.debug("CloudSatck API response doesn't contain responseObjName:" + responseObjName + + " because response is empty"); return null; } return (new Gson()).fromJson(json.eval(responseName), collectionType);
