cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [7/7] git commit: updated refs/heads/master to 0223657
Date Mon, 22 Jul 2013 18:48:40 GMT
Changed some debug logs to trace


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

Branch: refs/heads/master
Commit: 02236576c0d3bc28c5ec9c806d11adf7af2ec9e9
Parents: 1325014
Author: Alex Huang <alex.huang@citrix.com>
Authored: Mon Jul 22 11:46:21 2013 -0700
Committer: Alex Huang <alex.huang@citrix.com>
Committed: Mon Jul 22 11:48:12 2013 -0700

----------------------------------------------------------------------
 .../org/apache/cloudstack/context/CallContext.java    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02236576/api/src/org/apache/cloudstack/context/CallContext.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/context/CallContext.java b/api/src/org/apache/cloudstack/context/CallContext.java
index 9689a99..e3c1bf2 100644
--- a/api/src/org/apache/cloudstack/context/CallContext.java
+++ b/api/src/org/apache/cloudstack/context/CallContext.java
@@ -110,7 +110,9 @@ public class CallContext {
         CallContext callingContext = new CallContext(callingUser, callingAccount, contextId);
         s_currentContext.set(callingContext);
         NDC.push("ctx-" + UuidUtils.first(contextId));
-        s_logger.debug("Setting calling context: " + callingContext);
+        if (s_logger.isTraceEnabled()) {
+            s_logger.trace("Registered: " + callingContext);
+        }
         return callingContext;
     }
 
@@ -161,11 +163,13 @@ public class CallContext {
     public static CallContext unregister() {
         CallContext context = s_currentContext.get();
         if (context == null) {
-            s_logger.trace("No context to remove");
+            s_logger.debug("No context to remove");
             return null;
         }
         s_currentContext.remove();
-        s_logger.debug("Context removed " + context);
+        if (s_logger.isTraceEnabled()) {
+            s_logger.trace("Unregistered: " + context);
+        }
         String contextId = context.getContextId();
         String sessionIdOnStack = null;
         String sessionIdPushedToNDC = "ctx-" + UuidUtils.first(contextId);
@@ -210,9 +214,9 @@ public class CallContext {
 
     @Override
     public String toString() {
-        return new StringBuffer("CallContext[acct=").append(account.getId())
+        return new StringBuffer("CCtxt[acct=").append(account.getId())
                 .append("; user=").append(user.getId())
-                .append("; session=").append(contextId)
+                .append("; id=").append(contextId)
                 .append("]").toString();
     }
 }


Mime
View raw message