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

Strip ANSI color escape sequences when not outputting to a real TTY #76

Closed
ermo opened this issue Feb 28, 2024 · 3 comments
Closed

Strip ANSI color escape sequences when not outputting to a real TTY #76

ermo opened this issue Feb 28, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@ermo
Copy link
Contributor

ermo commented Feb 28, 2024

Logs currently look atrocious in a web browser due to ANSI color escape sequences not being stripped when outputting to a file or piping.

It matters when reviewing build server logs in a browser and ought to be fixed once and for all.

@ermo ermo added the bug Something isn't working label Feb 28, 2024
@ermo ermo added this to the 1.6.x milestone Feb 28, 2024
@EbonJaeger
Copy link
Member

When I output to a file and cat it, the colors appear fine in both Alacritty and gnome-terminal. How/where are you using this where it appears broken?

@ermo
Copy link
Contributor Author

ermo commented Feb 29, 2024

When I output to a file and cat it, the colors appear fine in both Alacritty and gnome-terminal. How/where are you using this where it appears broken?

solbuild logs viewed in a web browser (which is incapable of parsing ANSI terminal escape codes as colors etc.)

I suspect this was silently fixed for 1.6.0 by @silkeh though.

@ermo ermo moved this from Todo to In Progress in Tool Maintenance Feb 29, 2024
@ermo ermo modified the milestones: 1.6.1, 1.6.0 Feb 29, 2024
@silkeh
Copy link
Member

silkeh commented Mar 1, 2024

This was changed in #42 (included in 1.6.0): Solbuild now only enables the colored logger if the output is a TTY.

@silkeh silkeh closed this as completed Mar 1, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Tool Maintenance Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants