Skip to content

Add color-coded log formatter with level-aware ANSI colors#477

Merged
Carreau merged 1 commit intodeshaw:masterfrom
Carreau:color-handler
Feb 20, 2026
Merged

Add color-coded log formatter with level-aware ANSI colors#477
Carreau merged 1 commit intodeshaw:masterfrom
Carreau:color-handler

Conversation

@Carreau
Copy link
Collaborator

@Carreau Carreau commented Feb 19, 2026

Extract log formatting into a dedicated _PyflybyFormatter class that applies color based on log level: blue for info, yellow for warnings, and red for errors/critical. Previously all interactive output used a single hardcoded yellow prefix regardless of severity.

The formatter implements separate formatInteractive and formatPlain methods to keep the color logic out of the handler's emit method.

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.15%. Comparing base (beedbdb) to head (76f3349).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
+ Coverage   75.10%   75.15%   +0.04%     
==========================================
  Files          29       29              
  Lines        8816     8833      +17     
==========================================
+ Hits         6621     6638      +17     
  Misses       2195     2195              

☔ 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.

Extract log formatting into a dedicated _PyflybyFormatter class that
applies color based on log level: blue for info, yellow for warnings,
and red for errors/critical. Previously all interactive output used a
single hardcoded yellow prefix regardless of severity.

The formatter implements separate formatInteractive and formatPlain
methods to keep the color logic out of the handler's emit method.
@Carreau Carreau merged commit c9252aa into deshaw:master Feb 20, 2026
12 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.

1 participant