Rollup merge of #122831 - onur-ozkan:less-verbose-fail-logs, r=clubby789
make failure logs less verbose Resolves #122706 Logs without verbose flag:  Logs with verbose flag:  I decided to exclude command from the log since it's already included in verbose mode. cc ```@Nilstrieb```
This commit is contained in:
commit
05ae329524
1 changed files with 15 additions and 7 deletions
|
@ -1009,15 +1009,23 @@ impl Build {
|
||||||
let result = if !output.status.success() {
|
let result = if !output.status.success() {
|
||||||
if print_error {
|
if print_error {
|
||||||
println!(
|
println!(
|
||||||
"\n\ncommand did not execute successfully: {:?}\n\
|
"\n\nCommand did not execute successfully.\
|
||||||
expected success, got: {}\n\n\
|
\nExpected success, got: {}",
|
||||||
stdout ----\n{}\n\
|
|
||||||
stderr ----\n{}\n\n",
|
|
||||||
command.command,
|
|
||||||
output.status,
|
output.status,
|
||||||
|
);
|
||||||
|
|
||||||
|
if !self.is_verbose() {
|
||||||
|
println!("Add `-v` to see more details.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
self.verbose(|| {
|
||||||
|
println!(
|
||||||
|
"\nSTDOUT ----\n{}\n\
|
||||||
|
STDERR ----\n{}\n",
|
||||||
String::from_utf8_lossy(&output.stdout),
|
String::from_utf8_lossy(&output.stdout),
|
||||||
String::from_utf8_lossy(&output.stderr)
|
String::from_utf8_lossy(&output.stderr)
|
||||||
);
|
)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Err(())
|
Err(())
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue