Skip to content

Commit

Permalink
Fix config test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Oct 11, 2023
1 parent 499f830 commit 984dc2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion zebrad/src/components/tracing/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ impl Tracing {
}

if uses_intro {
eprintln!("Sending logs to {log_file:?}...");
// We want this to appear on stdout instead of the usual log messages.
println!("Sending logs to {log_file:?}...");

Check failure on line 143 in zebrad/src/components/tracing/component.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

use of `println!`

error: use of `println!` --> zebrad/src/components/tracing/component.rs:143:17 | 143 | println!("Sending logs to {log_file:?}..."); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout = note: `-D clippy::print-stdout` implied by `-D warnings`
}
let log_file = File::options().append(true).create(true).open(log_file)?;
Box::new(log_file) as BoxWrite
Expand Down
5 changes: 4 additions & 1 deletion zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,11 @@ fn stored_configs_work() -> Result<()> {
"loaded zebrad config.*config_path.*=.*{}",
regex::escape(config_file_name)
),
// If they are sent to a file, we just see a log file message.
// If they are sent to a file, we see a log file message on stdout,
// and a logo, welcome message, and progress bar on stderr.
"Sending logs to".to_string(),
// TODO: add expect_stdout_or_stderr_line_matches() and check for this instead:
//"Thank you for running a mainnet zebrad".to_string(),
];

tracing::info!(
Expand Down

0 comments on commit 984dc2a

Please sign in to comment.