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

Fix ANSI escape codes being included in log files on macOS #1115

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

dannycjones
Copy link
Contributor

Description of change

Before this change, log files written on macOS would include ANSI escape codes (#1050). It's unclear why this is not reproducible on Linux.

This change reorders the logging layers such that the console layer (with ANSI) is evaluated last, and so the mutations to add ANSI escapes is not applied when writing log files. This issue appears related: tokio-rs/tracing#658.

Relevant issues: #1050

Does this change impact existing behavior?

This fixes log files written on macOS (which is an unsupported platform).

Does this change need a changelog entry in any of the crates?

This is a minor bug fix on an unsupported platform, so no changelog entry needed.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

Signed-off-by: Daniel Carl Jones <[email protected]>
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests November 7, 2024 15:52 — with GitHub Actions Inactive
@dannycjones dannycjones linked an issue Nov 7, 2024 that may be closed by this pull request
@dannycjones dannycjones added this pull request to the merge queue Nov 8, 2024
Merged via the queue into awslabs:main with commit c4ec299 Nov 8, 2024
23 checks passed
@dannycjones dannycjones deleted the fix-ansi-macos branch November 8, 2024 14:35
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.

Log files contain ANSI colors when using --foreground flag
2 participants