Must not go underneath the context object and access __dict__

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
This commit is contained in:
Joshua Harlow 2017-01-25 12:32:17 -08:00
parent aed513015c
commit 1640564dd1
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ class ContextFormatter(logging.Formatter):
if context:
record.user_identity = (
self.conf.logging_user_identity_format %
_ReplaceFalseValue(context.__dict__)
_ReplaceFalseValue(_dictify_context(context))
)
if record.__dict__.get('request_id'):