-
-
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
Enable logging to display Text objects with supported Styles #1751
Comments
It probably wouldn't be quite as transparent as that. I wouldn't want to change the output of
|
@willmcgugan - that approach would be excellent, thank you! |
Hacked in that property. If you could give Rich 10.15.3a2 a try. |
That's in v10.16.0 now |
Did I solve your problem? Consider sponsoring the ongoing work on Rich and Textual. Or buy me a coffee to say thanks. |
10.16.2 Fixed Fixed @ not being escaped in markup 10.16.1 Fixed Fixed issues with overlapping tags Textualize/rich#1755 10.16.0 Fixed Double print of progress bar in Jupyter Textualize/rich#1737 Added Added Text.markup property Textualize/rich#1751
As a developer of network infrastructure testing systems I use Rich to display progress of testing using the logging feature and display reports using the Table feature. In the same way that I use Text+Style to colorize my Tables, I would like to colorize/style text that is the logging output using the same Text/Style classes. Presently the logging feature supports the "markup" color notation exclusively.
This issue requests an enhancement so that I can pass Text objects to the logging log methods (info, error, warning, etc.) so that the output in the logs shows all color/styling that is supported by the Python logging infrastructure.
Example desired usage; assume the variable "logger" is a Rich python logger instance:
The desired output would be "Hello Jeremy" with the text "Jeremy" colored blue.
The text was updated successfully, but these errors were encountered: