-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[REQUEST] Markup=True when configuring logging RichHandler #171
Comments
The I wasn't keen on enabling markup in the handler, because log messages can come from libraries not under your control. If you enable logging for a dependency and that lib writes a log message containing square brackets then the contents of the square brackets will be removed or result in an unwanted style. That said, I could add that option to RichHandler as you suggested, with a prominent warning in the docs... |
Yes exactly - I figured that was the case and I agree it makes sense not to have it turned on by default. The |
Added the markup parameter in v4.0.0 |
Ok, that was silly fast. You haven't even triaged the issue yet and you've already pushed a release with the new feature 😆 Amazing stuff, thank you!! |
How would you improve Rich?
The Rich logging is really nice to use, however I must admit that having to add
extra={"markup": True}
on loads of log calls bloats the code a bit.Would it be possible to make this an option in
rich.logging.RichHandler()
as well, so that this could be enabled by default for all log messages when configuring the logger?For example, something like:
The text was updated successfully, but these errors were encountered: