cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 8202acd
Date Fri, 16 Aug 2013 18:11:26 GMT
Updated Branches:
  refs/heads/master 3ed3c53f7 -> 8202acdbc


CLOUDSTACK-3274: Remove duplicate cleanString calls in logging api for
performance improvement.



Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/97ff4981
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/97ff4981
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/97ff4981

Branch: refs/heads/master
Commit: 97ff4981c5845f0f37ae96494ed0c5f13721b6f2
Parents: 3ed3c53
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Aug 16 11:10:25 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Aug 16 11:10:25 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServer.java  | 8 ++++----
 server/src/com/cloud/api/ApiServlet.java | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97ff4981/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 d071c37..aebb98c 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -316,7 +316,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler,
ApiSer
                 throw e;
             }
         } finally {
-            s_accessLogger.info(StringUtils.cleanString(sb.toString()));
+            s_accessLogger.info(sb.toString());
             CallContext.unregister();
         }
     }
@@ -524,7 +524,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler,
ApiSer
                 String objUuid = (objectUuid == null) ? objectId.toString() : objectUuid;
                 return getBaseAsyncCreateResponse(jobId, (BaseAsyncCreateCmd)asyncCmd, objUuid);
             } else {
-            SerializationContext.current().setUuidTranslation(true);
+                SerializationContext.current().setUuidTranslation(true);
                 return getBaseAsyncResponse(jobId, asyncCmd);
             }
         } else {
@@ -581,8 +581,8 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler,
ApiSer
                     continue;
                 }
                 String instanceUuid = ApiDBUtils.findJobInstanceUuid(job);
-                    objectJobMap.put(instanceUuid, job);
-                }
+                objectJobMap.put(instanceUuid, job);
+            }
 
             for (ResponseObject response : responses) {
                 if (response.getObjectId() != null && objectJobMap.containsKey(response.getObjectId()))
{

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97ff4981/server/src/com/cloud/api/ApiServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java
index 22047ff..912abab 100755
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@ -124,8 +124,8 @@ public class ApiServlet extends HttpServlet {
         // logging the request start and end in management log for easy debugging
         String reqStr = "";
         if (s_logger.isDebugEnabled()) {
-            reqStr = auditTrailSb.toString() + " " + req.getQueryString();
-            s_logger.debug("===START=== " + StringUtils.cleanString(reqStr));
+            reqStr = auditTrailSb.toString() + " " + StringUtils.cleanString(req.getQueryString());
+            s_logger.debug("===START=== " + reqStr);
         }
 
         try {
@@ -333,9 +333,9 @@ public class ApiServlet extends HttpServlet {
             s_logger.error("unknown exception writing api response", ex);
             auditTrailSb.append(" unknown exception writing api response");
         } finally {
-            s_accessLogger.info(StringUtils.cleanString(auditTrailSb.toString()));
+            s_accessLogger.info(auditTrailSb.toString());
             if (s_logger.isDebugEnabled()) {
-                s_logger.debug("===END=== " + StringUtils.cleanString(reqStr));
+                s_logger.debug("===END=== " + reqStr);
             }
             // cleanup user context to prevent from being peeked in other request context
             CallContext.unregister();


Mime
View raw message