Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting context attributes for logging handler #110

Closed
janhaviagrawal opened this issue Jul 3, 2018 · 3 comments
Closed

Setting context attributes for logging handler #110

janhaviagrawal opened this issue Jul 3, 2018 · 3 comments

Comments

@janhaviagrawal
Copy link
Contributor

janhaviagrawal commented Jul 3, 2018

With the latest release, it is possible to set up context.properties for logging handler but it still does not allow setting other context attributes (user, operation etc) passed as channel.context.
This is because in the channel write code

local_context = context or self._context
for key, value in self._write_tags(local_context):
    tags[key] = value

This ignores the attributes set in the channel itself. This should be

for prop_context in [self._context, context]:
    for key, value in self._write_tags(prop_context):
        tags[key] = value
@janhaviagrawal janhaviagrawal changed the title Setting context attributesfor logging handler Setting context attributes for logging handler Jul 3, 2018
@janhaviagrawal
Copy link
Contributor Author

PR for this: #114

@SergeyKanzhelev
Copy link
Contributor

Thanks again for contribution. As I mentioned in PR - please send CHANGELOG update as well. Closing issue

@janhaviagrawal
Copy link
Contributor Author

PR for CHANGELOG #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants