Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make color output configurable (config and/or CLI and/or environment variable) #604

Closed
LukasKalbertodt opened this issue Nov 28, 2022 · 0 comments · Fixed by #609
Closed
Labels
kind:new-feature A new feature priority:low Low priority

Comments

@LukasKalbertodt
Copy link
Member

Currently, our logger always uses colors when printing to stdout. That's not always the best option. This should be configurable. Just "how" is the question.

  • Via CLI --color {always|auto|never}
  • Via config file?
  • Maybe even via a global environment variable. I know that there are some general env vars that are interpreted by some commands. For example, take a look here: Support CLICOLOR and CLICOLOR_FORCE BurntSushi/termcolor#41 (just as an example of what variables exist). Maybe we want to respect a "common" one as well. Has to be researched tho.
@LukasKalbertodt LukasKalbertodt added kind:new-feature A new feature priority:low Low priority labels Nov 28, 2022
JulianKniephoff added a commit that referenced this issue Nov 30, 2022
)

This also detects whether stdout/stderr is a terminal (or piped to a
file) and does not emit colors in the latter case. This is very useful
for various situations. In 'auto' mode it also respects the `NO_COLOR=1`
env var.

Fixes #604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:new-feature A new feature priority:low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant