Properly format log record & report logged extras to rollbar#488
Open
terencehonles wants to merge 1 commit intorollbar:masterfrom
Open
Properly format log record & report logged extras to rollbar#488terencehonles wants to merge 1 commit intorollbar:masterfrom
extras to rollbar#488terencehonles wants to merge 1 commit intorollbar:masterfrom
Conversation
This was referenced Feb 27, 2026
95f8f4a to
7395329
Compare
This change passes the log record through the configured formatter, if any, and reports any non blocklisted logging record keys as extra data. This allows supporting Python logging's `extra` keyword argument which sets additional properties on the log record.
7395329 to
53b3243
Compare
terencehonles
commented
Feb 27, 2026
| self.rollbar_handler = RollbarHandler(_test_access_token, _test_environment) | ||
| self.rollbar_handler.setLevel(logging.WARNING) | ||
|
|
||
| logger.addHandler(self.rollbar_handler) |
Contributor
Author
There was a problem hiding this comment.
Since loggers are global, this was attaching more and more handlers with potentially conflicting config. I removed the _create_logger method and inlined it in the setUp and provided the correct tearDown to ensure the handlers were removed when the test finishes.
12 tasks
Contributor
Author
|
@danielmorell when you get a chance, I fixed a few open issues if you can review the changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
This change passes the log record through the configured formatter, if any, and reports any non blocklisted logging record keys as extra data. This allows supporting Python logging's
extrakeyword argument which sets additional properties on the log record.Type of change
Related issues
Checklists
Development
Code review