Skip to content

log.go: Export log color codes#592

Merged
raphael merged 1 commit intogoadesign:mainfrom
FutureQuest:pr/exportColor
Aug 28, 2025
Merged

log.go: Export log color codes#592
raphael merged 1 commit intogoadesign:mainfrom
FutureQuest:pr/exportColor

Conversation

@TerraTech
Copy link
Copy Markdown
Contributor

This gives an application to manipulate the color codes. This was done because the default for SeverityInfo (blue) was difficult to read when displayed on a console black background.

In my case, I'm swapping out SeverityInfo blue with cyan color ("\033[36m") which makes its log output much easier to read.

On a different branch, I'm defining colors for:

  1. ColorBlue
  2. ColorBlueBold
  3. ColorCyan

but those little color helpers are not in this PR in order to keep it tightly focused to the original. If you want me to include them, your can look at my FQdevel branch and I can fold that into this PR. I just didn't know if you wanted any extra noise in this submission.

  This gives an application to manipulate the color codes.  This was done
    because the default for SeverityInfo (blue) was difficult to read
    when displayed on a console black background.
@TerraTech
Copy link
Copy Markdown
Contributor Author

Upon further reflection, I changed SeverityInfo blue to ColorBlueBold in the FQdevel branch.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.75%. Comparing base (6fec769) to head (81901c0).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #592   +/-   ##
=======================================
  Coverage   85.75%   85.75%           
=======================================
  Files          39       39           
  Lines        2282     2282           
=======================================
  Hits         1957     1957           
  Misses        300      300           
  Partials       25       25           
Flag Coverage Δ
micro 85.75% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raphael
Copy link
Copy Markdown
Member

raphael commented Aug 28, 2025

This is great, thank you! I'm wondering if we could add an option e.g. WithColors that would let users customize the colors in a convenient way? That could be a separate PR.

@raphael raphael merged commit b064666 into goadesign:main Aug 28, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants