From e2d3cf03ae64b9a9b0549ba09d4732fb5191e7cb Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Sat, 20 Apr 2024 01:43:56 +0100 Subject: [PATCH] better logging --- mantis/node/src/bin/mantis.rs | 4 ++-- mantis/node/src/mantis/autopilot.rs | 5 ++--- mantis/node/src/mantis/cosmos/client.rs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mantis/node/src/bin/mantis.rs b/mantis/node/src/bin/mantis.rs index b0a93ee..34d454f 100644 --- a/mantis/node/src/bin/mantis.rs +++ b/mantis/node/src/bin/mantis.rs @@ -237,11 +237,11 @@ async fn send_solution( .await; match &result.tx_result.code { cosmrs::tendermint::abci::Code::Err(err) => { - log::info!("result: {:?}", result); + log::error!("solution result: {:?}", result); panic!("Error: {:?}", err) } cosmrs::tendermint::abci::Code::Ok => { - log::info!("ok: {:?}", result); + log::trace!("ok: {:?}", result); } } } diff --git a/mantis/node/src/mantis/autopilot.rs b/mantis/node/src/mantis/autopilot.rs index f2623b0..24c1ae6 100644 --- a/mantis/node/src/mantis/autopilot.rs +++ b/mantis/node/src/mantis/autopilot.rs @@ -36,11 +36,10 @@ pub async fn cleanup( .await; match &result.tx_result.code { cosmrs::tendermint::abci::Code::Err(err) => { - log::warn!("result: {:?}", result); - panic!("Error: {:?}", err) + log::error!("clean result: {:?}", result); } cosmrs::tendermint::abci::Code::Ok => { - log::info!("ok: {:?}", result); + log::trace!("ok: {:?}", result); } } } diff --git a/mantis/node/src/mantis/cosmos/client.rs b/mantis/node/src/mantis/cosmos/client.rs index 04c1acf..8052b51 100644 --- a/mantis/node/src/mantis/cosmos/client.rs +++ b/mantis/node/src/mantis/cosmos/client.rs @@ -139,7 +139,7 @@ pub async fn sign_and_tx_tendermint( .broadcast_commit(&rpc_client) .await .expect("broadcasted"); - log::error!("result: {:?}", result); + log::trace!("result: {:?}", result); assert!(!result.check_tx.code.is_err(), "err"); assert!(!result.tx_result.code.is_err(), "err"); result