[Bug? Docs?] It's not obvious from the docs how to disable highlighting when using RichHandler
#3376
Open
1 of 2 tasks
Labels
(I found it, but there's more to it)
Describe the bug
I noticed unexpected splotches of green in my log ouput using RichHandler.
![Screenshot from 2024-06-08 15-03-53](https://private-user-images.githubusercontent.com/5834582/337932579-253f0551-bf91-419d-9a22-db6fa3b70c12.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyOTkxMzYsIm5iZiI6MTcxOTI5ODgzNiwicGF0aCI6Ii81ODM0NTgyLzMzNzkzMjU3OS0yNTNmMDU1MS1iZjkxLTQxOWQtOWEyMi1kYjZmYTNiNzBjMTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjVUMDcwMDM2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGZkMTVlZGU5YmY1YWI1ZjgyYjNiOGM2ZWIwMThlMWM0OTZmMDQ3ODFhYzg1MDRjMjk0YzA2YzRjNWZhYjIzNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.xeQiH3m863nqUfOexotLSloNPdCbKsOte2Wz8pcco5g)
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: