Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: Generate a copy of json_fields before adding message #653

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

Closed
wants to merge 1 commit into from

Conversation

mat105
Copy link

@mat105 mat105 commented Oct 19, 2022

We had a problem where we wanted to log a payload to another service via "json_fields", however, the logging handler added the key "message" to the payload so we started having errors. I propose to generate a copy of the json_fields instead of using the user supplied one.

I made a copy before the message is added to the dictionary.

Fixes #652

We had a problem where we wanted to log a payload to another service via "json_fields", however, the logging handler added the key "message" to the payload so we started having errors. I propose to generate a copy of the json_fields instead of using the user supplied one.
@mat105 mat105 requested review from a team as code owners October 19, 2022 16:44
@google-cla
Copy link

google-cla bot commented Oct 19, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: logging Issues related to the googleapis/python-logging API. labels Oct 19, 2022
@daniel-sanche
Copy link
Contributor

LGTM, although it could also use a unit test to be safe going forward.

If you sign the CLA I can merge this, but feel free to close and I can make the change as well. Thanks for putting this together!

@mat105
Copy link
Author

mat105 commented Oct 19, 2022

OK! i'll close this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate a copy of json_fields before adding message
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.