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

Add a function to force color in console output #1724

Merged
merged 2 commits into from Feb 20, 2019
Merged

Add a function to force color in console output #1724

merged 2 commits into from Feb 20, 2019

Conversation

orobardet
Copy link
Contributor

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.

@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

Merging #1724 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1724      +/-   ##
==========================================
+ Coverage   98.48%   98.48%   +<.01%     
==========================================
  Files          41       41              
  Lines        2044     2046       +2     
==========================================
+ Hits         2013     2015       +2     
  Misses         19       19              
  Partials       12       12
Impacted Files Coverage Δ
logger.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90587c7...d258fed. Read the comment docs.

@thinkerou
Copy link
Member

@orobardet how to use it? and what distinguish it from disableColor?

@orobardet
Copy link
Contributor Author

@orobardet how to use it? and what distinguish it from disableColor?

I added a new section in the README about controlling the colorization of log outputs, including the existing DisableConsoleColor and the new ForceConsoleColor.

@thinkerou thinkerou self-assigned this Feb 20, 2019
@thinkerou thinkerou added this to the 1.4 milestone Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants