django / daphne

Django Channels HTTP/WebSocket server
BSD 3-Clause "New" or "Revised" License
2.32k stars 256 forks source link

minor: ansi codes in log output #411

Open mustafa0x opened 2 years ago

mustafa0x commented 2 years ago

I use Rich as my Django logger, as described here: https://www.willmcgugan.com/blog/tech/post/richer-django-logging/

Everything worked fine with runserver, however once I started using Daphene there were ansi codes in the output.

image

I opened an issue in the Rich repo, but was advised that the issue is likely with Daphne https://github.com/Textualize/rich/issues/2127.

carltongibson commented 2 years ago

Happy to accept a contribution making this work... — but what exactly is the issue, and can you pin it down to where the problem in Daphne is — likely access.py?

mustafa0x commented 2 years ago

Thanks for the reply! I took a look and nothing stood out. Hope to inspect more later.