act icon indicating copy to clipboard operation
act copied to clipboard

Remove red color from logging messages

Open patinthehat opened this issue 2 years ago • 5 comments

This PR removes the color red from logging messages as red is typically associated with error messages, and can result in confusion with lots of output from many containers.

Avoiding red text removes the ambiguity of red text that is not an error message.

patinthehat avatar Dec 11 '22 01:12 patinthehat

Codecov Report

Merging #1502 (417173d) into master (4f8da0a) will increase coverage by 3.76%. The diff coverage is 67.68%.

:exclamation: Current head 417173d differs from pull request most recent head f5124ed. Consider uploading reports for the commit f5124ed to get more accurate results

@@            Coverage Diff             @@
##           master    #1502      +/-   ##
==========================================
+ Coverage   57.50%   61.27%   +3.76%     
==========================================
  Files          32       45      +13     
  Lines        4594     6990    +2396     
==========================================
+ Hits         2642     4283    +1641     
- Misses       1729     2403     +674     
- Partials      223      304      +81     
Impacted Files Coverage Δ
pkg/common/file.go 0.00% <0.00%> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/host_environment.go 0.00% <0.00%> (ø)
pkg/container/parse_env_file.go 0.00% <0.00%> (ø)
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/model/action.go 0.00% <0.00%> (ø)
pkg/model/step_result.go 0.00% <ø> (ø)
pkg/container/docker_run.go 13.58% <11.48%> (+8.04%) :arrow_up:
...ontainer/linux_container_environment_extensions.go 24.32% <24.32%> (ø)
pkg/model/workflow.go 46.43% <25.25%> (-4.48%) :arrow_down:
... and 38 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Dec 12 '22 21:12 codecov[bot]

It might be better to add an alternative color instead of only removing one.

@ChristopherHX I'm not sure there is another color that can be added while staying within the default ANSI color code range. I'd be willing to implement using something like the 256-color palette in another PR, though.

patinthehat avatar Dec 14 '22 05:12 patinthehat

We're using it for jobs names only, also I don't think it's good change to make given it's affecting only one person

@catthehacker I strongly disagree. It is common practice to display fatal error messages in red text, and if I've had confusion here I am sure others have as well. What if we moved to a 256-color palette and I added additional colors to offset the removal of red?

patinthehat avatar Dec 16 '22 11:12 patinthehat

It is common practice to display fatal error messages in red text,

I'm aware.

I am sure others have as well.

Source?

What if we moved to a 256-color palette and I added additional colors to offset the removal of red?

NACK for removing the colour, ACK for adding support for 24-bit colours, 8-bit isn't that useful anymore when all terminal emulators support true colour, leaving 4-bit colour space as a fallback

catthehacker avatar Dec 16 '22 17:12 catthehacker

Source?

I haven't polled anyone, but it's a common assumption. It's also a standard in style guidelines, such as Github's Primer guidelines: primer.style/primitives/colors

image

My point is just that imo, using red text is not the best design decision because red commonly means "error". I'd be happy to open another PR that adds more ANSI colors, but I believe that removing red from the palette is the right decision. Just my thoughts on it -

Thanks for your quick response :+1:

patinthehat avatar Dec 16 '22 22:12 patinthehat

PR is stale and will be closed in 14 days unless there is new activity

github-actions[bot] avatar Jan 16 '23 00:01 github-actions[bot]