From efba20239c1253c3e6ce4a68eed97585a74b8a46 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 13 Nov 2012 16:11:42 +0800 Subject: Adjust the logging_context_format_string. This patch fixed the bug 1078190. The 'logging_context_format_string' option uses some undefined fields in log.ContextAdapter() and context.RequestContext(), which would result a 'KeyError' exception when calling logging functions. Change-Id: I41ee8a9ac89079c30e970477730c8615fb4636b7 --- openstack/common/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack/common/log.py b/openstack/common/log.py index 6cb3dfc..319c6e2 100644 --- a/openstack/common/log.py +++ b/openstack/common/log.py @@ -50,7 +50,7 @@ from openstack.common import notifier log_opts = [ cfg.StrOpt('logging_context_format_string', default='%(asctime)s %(levelname)s %(name)s [%(request_id)s ' - '%(user_id)s %(project_id)s] %(instance)s' + '%(user)s %(tenant)s] %(instance)s' '%(message)s', help='format string to use for log messages with context'), cfg.StrOpt('logging_default_format_string', -- cgit