Disabling ANSI escapes in Docker logging?

Hi all,

I’m running in Docker and forwarding logs elsewhere. Is there any way to disable ANSI escape sequences, as I end up with logs like:

e[32m2017-11-22 16:16:20 INFO (MainThread) [homeassistant.bootstrap] Home Assistant core initializede[0m

(note escape sequences at beginning and end)

I’ve tried changing TERM to something like xterm-mono, but it appears to be disregarded. The problem is essentially the same as this from the moby project.

Thanks!

Did you ever find a solution to this - I have exactly the same problem forwarding the logs to an ELK stack… Incredibly annoying to colour logs at the source…