浏览代码

HUE-7569 [core] Adding Thrift arguments to the logging of the return call

Romain Rigaux 8 年之前
父节点
当前提交
1e9c409
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/lib/thrift_util.py

+ 1 - 1
desktop/core/src/desktop/lib/thrift_util.py

@@ -445,7 +445,7 @@ class SuperClient(object):
           duration = time.time() - st
           duration = time.time() - st
 
 
           # Log the duration at different levels, depending on how long it took.
           # Log the duration at different levels, depending on how long it took.
-          logmsg = "Thrift call %s.%s returned in %dms: %s" % (str(self.wrapped.__class__), attr, duration * 1000, log_msg)
+          logmsg = "Thrift call: %s.%s(args=%s, kwargs=%s) returned in %dms: %s" % (str(self.wrapped.__class__), attr, str_args, repr(kwargs), duration * 1000, log_msg)
           if duration >= WARN_LEVEL_CALL_DURATION_MS:
           if duration >= WARN_LEVEL_CALL_DURATION_MS:
             logging.warn(logmsg)
             logging.warn(logmsg)
           elif duration >= INFO_LEVEL_CALL_DURATION_MS:
           elif duration >= INFO_LEVEL_CALL_DURATION_MS: