trivago / gollum

An n:m message multiplexer written in Go
http://gollum.readthedocs.org/en/latest/
Apache License 2.0
940 stars 74 forks source link

Coloured output can't be disabled with the -lc flag #217

Closed dkleuser closed 6 years ago

dkleuser commented 6 years ago

Issue description

The -lc flag should enable/disable coloured output for Gollums' internal logging coming from logrus. But with the current Gollum version, this flag doesn't work at all.

Context

I tried to deactivate the coloured output with the parameter -lc never to avoid having output formatted like the following in files:

ESC[97mPluginIDESC[0m=GollumKafkaOut ESC[97mPluginTypeESC[0m=producer.Kafka ESC[97mScopeESC[0m=Sarama
2018-01-03T17:42:59+00:00 hostname ESC[90m[2018-01-03 17:42:59 UTC]ESC[0m ESC[97m INFOESC[0m producer/leader/topicname/0 state change to [normal]

Also, the messages from that stream which are also sent to a topic in Kafka contain coloured parts which they shouldn't.

Steps to Reproduce (for bugs)

  1. Configure Gollum to write its internal "_GOLLUM_" stream in a file.
  2. Start Gollum with the parameter -lc never
  3. See entries like above in the newly created file.
  4. Try setting -lc always or -lc auto instead and you won't see any difference.

Your Environment

Used versions

arnecls commented 6 years ago

fixed in 0.5.1