Skip to content

Commit

Permalink
print local testnet log as println and errors as eprintln
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmaayan committed Oct 18, 2024
1 parent b97a30a commit b65c2c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion crates/aptos/src/node/local_testnet/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ pub const CONTAINER_NETWORK_NAME: &str = "aptos-local-testnet-network";
/// there no second location, there is just the one named pipe.
pub async fn get_docker() -> Result<Docker> {
let docker = Docker::connect_with_local_defaults()
.context(format!("{} (init_default)", ERROR_MESSAGE))?;
.context(format!("{} (init_default)", ERROR_MESSAGE))
.inspect_err(|e| eprintln!("{:#}", e))?;

// We have to specify the type because the compiler can't figure out the error
// in the case where the system is Unix.
Expand Down
6 changes: 3 additions & 3 deletions crates/aptos/src/node/local_testnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ impl RunLocalnet {
HealthChecker::IndexerApiMetadata(_) => continue,
};
if !silent {
eprintln!("{} is starting, please wait...", health_checker);
println!("{} is starting, please wait...", health_checker);
} else {
info!("[silent] {} is starting, please wait...", health_checker);
}
let fut = async move {
health_checker.wait(None).await?;
if !silent {
eprintln!(
println!(
"{} is ready. Endpoint: {}",
health_checker,
health_checker.address_str()
Expand Down Expand Up @@ -337,7 +337,7 @@ impl CliCommand<()> for RunLocalnet {
})?;
}

eprintln!(
println!(
"\nReadiness endpoint: http://{}:{}/\n",
bind_to, self.ready_server_args.ready_server_listen_port,
);
Expand Down

0 comments on commit b65c2c9

Please sign in to comment.