summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <jxharlow@godaddy.com>2017-01-25 12:32:17 -0800
committerDirk Mueller <dirk@dmllr.de>2017-01-29 18:45:34 +0100
commit60d66d2a7f517ff22da40824cb840e6697d78dba (patch)
tree6c8c21da94251673d45b9ccce08b85f95d021e41
parent26f838d686068bb1940f0af19099573debb0d58e (diff)
Must not go underneath the context object and access __dict__3.20.1
We have moved properties that no longer make directly accessing the __dict__ a good practice to go forward with (because those properties redirect to other members) so prefer to go through the correct conversion method to get at the dict that represents a context. Change-Id: I6fbf2192f477f62b1843321d2ec2147a3536a888 (cherry picked from commit 1640564dd15bda135ea37be3b76d5ae0ac28b7bc)
Notes
Notes (review): Code-Review+2: Davanum Srinivas (dims) <davanum@gmail.com> Workflow+1: Davanum Srinivas (dims) <davanum@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 30 Jan 2017 21:51:51 +0000 Reviewed-on: https://review.openstack.org/426587 Project: openstack/oslo.log Branch: refs/heads/stable/ocata
-rw-r--r--oslo_log/formatters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo_log/formatters.py b/oslo_log/formatters.py
index b66654d..275ceac 100644
--- a/oslo_log/formatters.py
+++ b/oslo_log/formatters.py
@@ -337,7 +337,7 @@ class ContextFormatter(logging.Formatter):
337 if context: 337 if context:
338 record.user_identity = ( 338 record.user_identity = (
339 self.conf.logging_user_identity_format % 339 self.conf.logging_user_identity_format %
340 _ReplaceFalseValue(context.__dict__) 340 _ReplaceFalseValue(_dictify_context(context))
341 ) 341 )
342 342
343 if record.__dict__.get('request_id'): 343 if record.__dict__.get('request_id'):