Skip to content

Commit

Permalink
Force CLI Client, Keytool, and Move to show only error logs and not i…
Browse files Browse the repository at this point in the history
…nfo. This can be overwritten by setting up a RUST_LOG env variable
  • Loading branch information
stefan-mysten committed Aug 29, 2023
1 parent 5dcb83a commit e7fe519
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/sui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ async fn main() {
let bin_name = env!("CARGO_BIN_NAME");
let args = Args::parse();
let _guard = match args.command {
SuiCommand::Console { .. } | SuiCommand::Client { .. } => {
telemetry_subscribers::TelemetryConfig::new()
.with_log_file(&format!("{bin_name}.log"))
.with_env()
.init()
}
SuiCommand::Console { .. }
| SuiCommand::Client { .. }
| SuiCommand::KeyTool { .. }
| SuiCommand::Move { .. } => telemetry_subscribers::TelemetryConfig::new()
.with_log_file(&format!("{bin_name}.log"))
.with_log_level("error")
.with_env()
.init(),
_ => telemetry_subscribers::TelemetryConfig::new()
.with_env()
.init(),
Expand Down

0 comments on commit e7fe519

Please sign in to comment.