Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5E5CEC1E for ; Mon, 14 Jan 2013 18:00:46 +0000 (UTC) Received: (qmail 32015 invoked by uid 500); 14 Jan 2013 18:00:36 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 31941 invoked by uid 500); 14 Jan 2013 18:00:36 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 30845 invoked by uid 99); 14 Jan 2013 18:00:35 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 18:00:34 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B06EA1A3C5; Mon, 14 Jan 2013 18:00:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [15/51] git commit: ApiServer: Log a better message if api access fails and debug it Message-Id: <20130114180034.B06EA1A3C5@tyr.zones.apache.org> Date: Mon, 14 Jan 2013 18:00:34 +0000 (UTC) ApiServer: Log a better message if api access fails and debug it Signed-off-by: Rohit Yadav 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/ui-quick-view-v2 Commit: e63e35250876a4f985a707ac52bdef34465a2470 Parents: 345c179 Author: Rohit Yadav Authored: Thu Jan 10 16:08:16 2013 -0800 Committer: Rohit Yadav 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