fix(log): enable ansi color only in terminal#12488
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 14, 2023
Merged
Conversation
Collaborator
|
r? @epage (rustbot has picked a reviewer for you, use r? to override) |
Member
Author
|
IIUC, this is aligned with how |
Member
Author
|
Currently blocked on rust-lang/rust#114804. While we can switch from main.rs to an empty lib.rs to bypass that, I do think this is a good test to catch this kind of subtle change. diff --git a/tests/testsuite/future_incompat_report.rs b/tests/testsuite/future_incompat_report.rs
index 9f451a64c..4d2c66d17 100644
--- a/tests/testsuite/future_incompat_report.rs
+++ b/tests/testsuite/future_incompat_report.rs
@@ -164,7 +164,7 @@ fn test_multi_crate() {
second-dep = "*"
"#,
)
- .file("src/main.rs", "fn main() {}")
+ .file("src/lib.rs", "")
.build();
for command in &["build", "check", "rustc", "test"] { |
fd14f5f to
c07043b
Compare
epage
approved these changes
Aug 14, 2023
Contributor
epage
left a comment
There was a problem hiding this comment.
r= me when this is able to go through
Member
Author
|
Thank you for the review! @bors r+ |
Contributor
Member
Author
|
@bors r- |
Contributor
bors
added a commit
that referenced
this pull request
Aug 14, 2023
fix(log): enable ansi color only in terminal
Member
Author
|
@bors r=epage |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 14, 2023
Update cargo 6 commits in 7e9de3f4ec3708f500bec142317895b96131e47c..7c3904d6c3ed54e8a413023519b55a536ad44d5b 2023-08-13 00:47:32 +0000 to 2023-08-14 20:11:43 +0000 - fix(lints): Doctest extraction should respect `[lints]` (rust-lang/cargo#12501) - test: relax assertions of panic message (again) (rust-lang/cargo#12500) - doc(unstable): `cargo test` does not provide `--keep-going` (rust-lang/cargo#12492) - fix(log): enable ansi color only in terminal (rust-lang/cargo#12488) - Update cargo-yank.md (rust-lang/cargo#12490) - test: bypass `rustc --test` impl details for `-Zfuture-incompat-test` (rust-lang/cargo#12491) r? `@ghost`
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this pull request
Apr 7, 2024
Update cargo 6 commits in 7e9de3f4ec3708f500bec142317895b96131e47c..7c3904d6c3ed54e8a413023519b55a536ad44d5b 2023-08-13 00:47:32 +0000 to 2023-08-14 20:11:43 +0000 - fix(lints): Doctest extraction should respect `[lints]` (rust-lang/cargo#12501) - test: relax assertions of panic message (again) (rust-lang/cargo#12500) - doc(unstable): `cargo test` does not provide `--keep-going` (rust-lang/cargo#12492) - fix(log): enable ansi color only in terminal (rust-lang/cargo#12488) - Update cargo-yank.md (rust-lang/cargo#12490) - test: bypass `rustc --test` impl details for `-Zfuture-incompat-test` (rust-lang/cargo#12491) r? `@ghost`
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
Update cargo 6 commits in 7e9de3f4ec3708f500bec142317895b96131e47c..7c3904d6c3ed54e8a413023519b55a536ad44d5b 2023-08-13 00:47:32 +0000 to 2023-08-14 20:11:43 +0000 - fix(lints): Doctest extraction should respect `[lints]` (rust-lang/cargo#12501) - test: relax assertions of panic message (again) (rust-lang/cargo#12500) - doc(unstable): `cargo test` does not provide `--keep-going` (rust-lang/cargo#12492) - fix(log): enable ansi color only in terminal (rust-lang/cargo#12488) - Update cargo-yank.md (rust-lang/cargo#12490) - test: bypass `rustc --test` impl details for `-Zfuture-incompat-test` (rust-lang/cargo#12491) r? `@ghost`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
In #12458 we introduced
tracingbut forgot to consult if it is in tty to enable color logs.How should we test and review this PR?
cargo tree &> logand check iflogfile contains any ansi color code.Additional information
I'll hold off
CARGO_LOGrespecting--color=alwaysfor now.#9012 is something can be resolved as a whole.
tracing_subscriber::reloadis also a thing to consider, so that we can configure logging color and output file after loadingconfig.toml