rainbow_logging_handler
rainbow_logging_handler copied to clipboard
Support for PyCharm's console
When using PyCharm's console the output is not colorized, this is because PyCharm uses redirected streams and as a result self.is_tty is always false, forzing the use of StreamHandler.format(self, record) instead of self.colorize(record), even though PyCharms supports ANSI codes fine.
As far as I know, there isn't a way to automatically detect if a stream supports ANSI codes, so I added the flag passthrough to be able to ignore self.is_tty check.
Hi!
I took over the project maintenance. Can you add an example how you are using this with PyCharm, so I can test out? I am another PyCharm using fellow.