summaryrefslogtreecommitdiffstats
path: root/multivimbroker
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-05-03 10:28:11 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-05-03 10:29:14 +0800
commitec8cdb885908b5018612475d083889b1f5653a6f (patch)
tree9858e8c09523b64d3652720c10b3f0abd759fb35 /multivimbroker
parent93e73a8d52e5ae6b261da83884b32fe1e8e2d909 (diff)
Fix logging middleware
Convert uuid to str Change-Id: I710e40b444cd7d81abd2a6a8865b5261312b6dca Issue-ID: MULTICLOUD-218 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'multivimbroker')
-rw-r--r--multivimbroker/multivimbroker/middleware.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/multivimbroker/multivimbroker/middleware.py b/multivimbroker/multivimbroker/middleware.py
index 5b320a3..8bb7357 100644
--- a/multivimbroker/multivimbroker/middleware.py
+++ b/multivimbroker/multivimbroker/middleware.py
@@ -46,11 +46,11 @@ class LogContextMiddleware(object):
# Fetch TRANSACTIONID Id and pass to plugin server
ReqeustID = request.META.get("HTTP_X_TRANSACTIONID", None)
if ReqeustID is None:
- ReqeustID = uuid.uuid3(uuid.NAMESPACE_URL, SERVICE_NAME)
+ ReqeustID = str(uuid.uuid3(uuid.NAMESPACE_URL, SERVICE_NAME))
request.META["HTTP_X_TRANSACTIONID"] = ReqeustID
MDC.put("requestID", ReqeustID)
# generate the unique id
- InovocationID = uuid.uuid3(uuid.NAMESPACE_DNS, SERVICE_NAME)
+ InovocationID = str(uuid.uuid3(uuid.NAMESPACE_DNS, SERVICE_NAME))
MDC.put("invocationID", InovocationID)
MDC.put("serviceName", SERVICE_NAME)
# access ip