-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rich logging #2897
Rich logging #2897
Conversation
as *rich* is now doing this
Shiny ✨ . I'll review once I have time to test this. By the way, does this help with #2896 ? |
Ah yes, this would close #2896! The "Generating..." spinner is still there (if you're sharpeyed, you might see it in the above screen cast); the trick was to use the same console. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, but overall looks really nice. Thanks!
matches generator format
This also updates the formatting of the "Found Writer" debug message to match the Generators:
|
I've also expanded the use the General errors (as run through the |
Which ones are those? If you mean |
Yes, it was In any case, I didn't change the behaviour, it just seemed off at times. |
Unrelated note: Maybe we could add support for Better Exceptions, much like my friend Hynek just did for Structlog. |
Somewhat related note: The only remaining non-rich output is the I was also thinking about making |
@avaris: Any chance you could take another look at this and update your review with any remaining items to be addressed, if any? |
@avaris: What do you think we should do in terms of moving this forward? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Sorry about that, I think this is good as is. We can always add further enhancements later. |
@avaris: No need to be sorry! You raised some good points, which hopefully we can use as guidance for further improvements in the future. @MinchinWeb: Many thanks for these enhancements! Very cool, indeed. 💯 |
Further to #2869, this expands rich's usage by extending it to cover logging.
This has the side effect of somewhat simplifying the logging code we need "in house" as some of this is pushed to rich.
Current (v4.6.0) logging:
Logging with this PR:
Pull Request Checklist
Re formatting: On my side I'm showing quite a large number of files that would be reformatted by black and isort. I'm not going to make those changes here...