You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/01/11 01:08:57 UTC
git commit: ApiServer: Log a better message if api access fails and
debug it
Updated Branches:
refs/heads/master 345c179e7 -> e63e35250
ApiServer: Log a better message if api access fails and debug it
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e63e3525
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e63e3525
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e63e3525
Branch: refs/heads/master
Commit: e63e35250876a4f985a707ac52bdef34465a2470
Parents: 345c179
Author: Rohit Yadav <bh...@apache.org>
Authored: Thu Jan 10 16:08:16 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Jan 10 16:08:16 2013 -0800
----------------------------------------------------------------------
server/src/com/cloud/api/ApiServer.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e63e3525/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 7387125..be3c087 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -552,14 +552,14 @@ public class ApiServer implements HttpRequestHandler {
if (userId != null) {
User user = ApiDBUtils.findUserById(userId);
if (!isCommandAvailable(user, commandName)) {
- s_logger.warn("The given command:" + commandName + " does not exist or it is not available for user");
+ s_logger.debug("The given command:" + commandName + " does not exist or it is not available for user with id:" + userId);
throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command does not exist or it is not available for user");
}
return true;
} else {
// check against every available command to see if the command exists or not
if (!isCommandAvailable(null, commandName) && !commandName.equals("login") && !commandName.equals("logout")) {
- s_logger.warn("The given command:" + commandName + " does not exist or it is not available for user");
+ s_logger.debug("The given command:" + commandName + " does not exist or it is not available for user with id:" + userId);
throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command does not exist or it is not available for user");
}
}
@@ -653,8 +653,8 @@ public class ApiServer implements HttpRequestHandler {
UserContext.updateContext(user.getId(), account, null);
if (!isCommandAvailable(user, commandName)) {
- s_logger.warn("The given command:" + commandName + " does not exist or it is not available for user");
- throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command:" + commandName + " does not exist or it is not available for user");
+ s_logger.debug("The given command:" + commandName + " does not exist or it is not available for user");
+ throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command:" + commandName + " does not exist or it is not available for user with id:" + userId);
}
// verify secret key exists