[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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODQ2MDQsIm5iZiI6MTcxOTk4NDMwNCwicGF0aCI6Ii81ODM0NTgyLzMzNzkzMjU3OS0yNTNmMDU1MS1iZjkxLTQxOWQtOWEyMi1kYjZmYTNiNzBjMTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMDUyNTA0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmZhMWYzYjA5NGM2OWVjYjgxZjU4NDIyMzU2YzY2MjBmMDVlZDg2NThhMWIwMzcwZGUxNDI5ZGY0NTUxYzU3MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.pj7Jc8HU4tGmiSbQ0KNnuII-4UGX0H_JoBSWveFKhD4)
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: