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

How do I force logs to have color when writing files? #1590

Closed
hel2o opened this issue Oct 13, 2018 · 1 comment
Closed

How do I force logs to have color when writing files? #1590

hel2o opened this issue Oct 13, 2018 · 1 comment

Comments

@hel2o
Copy link

hel2o commented Oct 13, 2018

Now, when my log is written to the file, there is no color.

@thinkerou
Copy link
Member

why? now only output color log on term.

@hel2o hel2o closed this as completed Nov 2, 2018
appleboy pushed a commit that referenced this issue Feb 20, 2019
Add a function `ForceConsoleColor`, like `DisableConsoleColor` but to force coloring the output.

It usefull when some IDE's integrated console (like IntelliJ or Goland) are not detected as TTY, but can display colors.

Also helps if one want to output color in log file (#1590) and as a workaround for #1547.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants