-
-
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
[Bug? Docs?] It's not obvious from the docs how to disable highlighting when using RichHandler
#3376
Open
1 of 2 tasks
Labels
Comments
I also found this very confusing. Initially, I tried to provide a console without highlighter, but none of them worked: console = Console(highlighter=None) # not work
console = Console(highlighter=NullHighlighter()) # not work
RichHandler(console=console) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(I found it, but there's more to it)
Describe the bug
I noticed unexpected splotches of green in my log ouput using RichHandler.
I see that the FAQ says I need to disable highlighting. The initializer for
RichHandler
does this, however:So setting highlighter to
None
doesn't disable it. Eventually I settled on this:...which works just fine
This would be easier to work with if either the default value for the kwarg was
ReprHighlighter
, and setting it toNone
effectively disabled the highlighter. Or, if that's undesirable for some reason, if the use ofNullHighligher
withRichHandler
was documented in the "how to disable" section here: https://rich.readthedocs.io/en/latest/highlighting.htmlPlatform
MacOS
rich==13.7.1
The text was updated successfully, but these errors were encountered: