Rich support for colored log

Hello django-devs,

I just looked around this repo https://github.com/willmcgugan/rich that enables a colorful output. The addition of this library to django can affect on performance in any way? It’s even possible?

Rich can print a better logout. Instead of normal log get

I didn’t find a special subtopic, if you thing that I’m in the wrong please, please tell me where can I get answers.

Thanks in advance.

Hi @ZurTaD, welcome!

I need to look more into Rich, but presumably it provides a Python logging formatter? If so, you set that formatter in your Django LOGGING config, setting a console handler to use it.

See Django’s Logging docs for a full primer.

If you get stuck, post back and we’ll see if we can work it out. (As I say, it’s on my list to look at :grinning:)

1 Like