Skip to content

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.

3 participants