Skip to content

Commit

Permalink
feat: logging
Browse files Browse the repository at this point in the history
  • Loading branch information
joske committed Jun 8, 2023
1 parent 52dfc09 commit 1484f7c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion leo/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Command for Deploy {
let _ = std::panic::take_hook();

// Call the `aleo node` command from the Aleo SDK.
println!();
tracing::info!("");
let command = AleoDeploy::try_parse_from([ALEO_CLI_COMMAND]).map_err(CliError::failed_to_parse_aleo_node)?;
let res = command.parse().map_err(CliError::failed_to_execute_aleo_node)?;

Expand Down
2 changes: 1 addition & 1 deletion leo/commands/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Command for Node {
}

// Call the `aleo node` command from the Aleo SDK.
println!();
tracing::info!("");
let command = AleoNode::try_parse_from(&arguments).map_err(CliError::failed_to_parse_aleo_node)?;
let res = command.parse().map_err(CliError::failed_to_execute_aleo_node)?;

Expand Down
2 changes: 1 addition & 1 deletion leo/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Command for Run {
// Unset the Leo panic hook
let _ = std::panic::take_hook();

println!();
tracing::info!("");
let command = AleoRun::try_parse_from(&arguments).map_err(CliError::failed_to_parse_aleo_run)?;
let res = command.parse().map_err(CliError::failed_to_execute_aleo_run)?;

Expand Down
1 change: 1 addition & 0 deletions leo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ enum Commands {
fn set_panic_hook() {
#[cfg(not(debug_assertions))]
std::panic::set_hook({
// this is in a panic hook, so we just keep the eprintln! here
Box::new(move |e| {
eprintln!("thread `{}` {}", std::thread::current().name().unwrap_or("<unnamed>"), e);
eprintln!("stack backtrace: \n{:?}", backtrace::Backtrace::new());
Expand Down

0 comments on commit 1484f7c

Please sign in to comment.