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.  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.