You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional environment information if useful to understand the bug
I'm using stolon inside a kubernetes with logs sent to Elasticsearch using fluentd (logs from container) and shown using Kibana
Enhancement Description
Logging is forcefully using color in the output. This work well when show directly in a terminal, not with any other method (e.g. "| less" or in Kibana).
When using another method, the escape sequence are shown: "�[34mINFO�[0m proxy/proxy.go:275 proxying to master address[...]"
I think this is important, as using Elasticsearch/Kibana is a common setup in Kubernetes and those escape sequence make the log less readable.
Even worse, when using ElasticSearch/Kibana, that means that the search string "error" won't match "[31mERROR�[0m sentinel/sentinel.go:274[...]" because by default is search for the word error (here the word is 31mERROR).
I could think of 3 ways to fix this:
Do some guessing, if attached to a tty use color, if not don't use color (I don't like that solution, seems fragile)
Always disable color
Add an option to disable color in output
I could try to come with a PR, just need to know which solution should be done :)
The text was updated successfully, but these errors were encountered:
@PierreF Uh! I was quite sure that this was already handled by zap but looks like I was wrong. If so this should be definitely handled.
Other logging libraries use tty detection (for example we could use https://github.com/mattn/go-isatty) but I'll also add an option to explicitly disable colored output.
A PR will be really appreciated. If you don't have time I'll do it by myself.
Submission type
Request for enhancement (RFE)
Environment
Anything where log is not shown on a terminal
Stolon version
master
Additional environment information if useful to understand the bug
I'm using stolon inside a kubernetes with logs sent to Elasticsearch using fluentd (logs from container) and shown using Kibana
Enhancement Description
Logging is forcefully using color in the output. This work well when show directly in a terminal, not with any other method (e.g. "| less" or in Kibana).
When using another method, the escape sequence are shown: "�[34mINFO�[0m proxy/proxy.go:275 proxying to master address[...]"
I think this is important, as using Elasticsearch/Kibana is a common setup in Kubernetes and those escape sequence make the log less readable.
Even worse, when using ElasticSearch/Kibana, that means that the search string "error" won't match "[31mERROR�[0m sentinel/sentinel.go:274[...]" because by default is search for the word error (here the word is 31mERROR).
I could think of 3 ways to fix this:
I could try to come with a PR, just need to know which solution should be done :)
The text was updated successfully, but these errors were encountered: