diff --git a/Cargo.lock b/Cargo.lock index c93ffc98c17..ceb8421b095 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7419,9 +7419,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "symbolic-common" -version = "12.3.0" +version = "12.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167a4ffd7c35c143fd1030aa3c2caf76ba42220bd5a6b5f4781896434723b8c3" +checksum = "9e0e9bc48b3852f36a84f8d0da275d50cb3c2b88b59b9ec35fdd8b7fa239e37d" dependencies = [ "debugid", "memmap2", @@ -7431,9 +7431,9 @@ dependencies = [ [[package]] name = "symbolic-demangle" -version = "12.3.0" +version = "12.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e378c50e80686c1c5c205674e1f86a2858bec3d2a7dfdd690331a8a19330f293" +checksum = "691e53bdc0702aba3a5abc2cffff89346fcbd4050748883c7e2f714b33a69045" dependencies = [ "cpp_demangle", "rustc-demangle", diff --git a/bin/fuel-core/src/cli.rs b/bin/fuel-core/src/cli.rs index 4bfe17cc87b..bee7d90c1c1 100644 --- a/bin/fuel-core/src/cli.rs +++ b/bin/fuel-core/src/cli.rs @@ -4,10 +4,6 @@ use std::{ path::PathBuf, str::FromStr, }; -use tracing::{ - info, - warn, -}; use tracing_subscriber::{ filter::EnvFilter, layer::SubscriberExt, @@ -17,8 +13,6 @@ use tracing_subscriber::{ #[cfg(feature = "env")] use dotenvy::dotenv; -#[cfg(feature = "env")] -use tracing::error; lazy_static::lazy_static! { pub static ref DEFAULT_DB_PATH: PathBuf = dirs::home_dir().unwrap().join(".fuel").join("db"); @@ -51,13 +45,7 @@ pub const HUMAN_LOGGING: &str = "HUMAN_LOGGING"; #[cfg(feature = "env")] fn init_environment() -> Option { - match dotenv() { - Ok(path) => Some(path), - Err(e) => { - error!("Unable to load .env environment variables: {e}. Please check that you have created a .env file in your working directory."); - None - } - } + dotenv().ok() } #[cfg(not(feature = "env"))] @@ -114,13 +102,13 @@ pub async fn run_cli() -> anyhow::Result<()> { init_logging().await?; if let Some(path) = init_environment() { let path = path.display(); - info!("Loading environment variables from {path}"); + tracing::info!("Loading environment variables from {path}"); } let opt = Opt::try_parse(); if opt.is_err() { let command = run::Command::try_parse(); if let Ok(command) = command { - warn!("This cli format for running `fuel-core` is deprecated and will be removed. Please use `fuel-core run` or use `--help` for more information"); + tracing::warn!("This cli format for running `fuel-core` is deprecated and will be removed. Please use `fuel-core run` or use `--help` for more information"); return run::exec(command).await } } diff --git a/crates/client/src/client/schema/message.rs b/crates/client/src/client/schema/message.rs index 680ae04edcc..5f179afb417 100644 --- a/crates/client/src/client/schema/message.rs +++ b/crates/client/src/client/schema/message.rs @@ -126,7 +126,7 @@ pub struct MessageProof { pub struct MessageProofArgs { /// Transaction id that contains the output message. pub transaction_id: TransactionId, - /// Message id of the output message that requires a proof. + /// The `Nonce` identifier of the output message that requires a proof. pub nonce: Nonce, /// The query supports either `commit_block_id`, or `commit_block_height` set on, not both. diff --git a/crates/metrics/src/services.rs b/crates/metrics/src/services.rs index cbbcf49b168..d7481aa34fb 100644 --- a/crates/metrics/src/services.rs +++ b/crates/metrics/src/services.rs @@ -46,7 +46,7 @@ impl ServicesMetrics { encode(&mut encoded_bytes, lock.deref()) .expect("Unable to decode service metrics"); if encoded_bytes.contains(service_name) { - tracing::error!("Service with '{}' name is already registered", service_name); + tracing::warn!("Service with '{}' name is already registered", service_name); } lock.register( diff --git a/crates/services/consensus_module/poa/src/service.rs b/crates/services/consensus_module/poa/src/service.rs index fc42fc8d49e..03ecb6e3903 100644 --- a/crates/services/consensus_module/poa/src/service.rs +++ b/crates/services/consensus_module/poa/src/service.rs @@ -70,7 +70,6 @@ use tokio::{ time::Instant, }; use tokio_stream::StreamExt; -use tracing::error; pub type Service = ServiceRunner>; #[derive(Clone)] @@ -305,9 +304,10 @@ where let mut tx_ids_to_remove = Vec::with_capacity(skipped_transactions.len()); for (tx_id, err) in skipped_transactions { - error!( + tracing::error!( "During block production got invalid transaction {:?} with error {:?}", - tx_id, err + tx_id, + err ); tx_ids_to_remove.push(tx_id); } diff --git a/crates/services/p2p/src/behavior.rs b/crates/services/p2p/src/behavior.rs index f54cc2a7611..fd27d2987f2 100644 --- a/crates/services/p2p/src/behavior.rs +++ b/crates/services/p2p/src/behavior.rs @@ -40,11 +40,6 @@ use libp2p::{ Multiaddr, PeerId, }; -use tracing::{ - debug, - error, - warn, -}; #[derive(Debug)] pub enum FuelBehaviourEvent { @@ -169,16 +164,16 @@ impl FuelBehaviour { acceptance, ) { Ok(true) => { - debug!(target: "fuel-p2p", "Sent a report for MessageId: {} from PeerId: {}", msg_id, propagation_source); + tracing::debug!(target: "fuel-p2p", "Sent a report for MessageId: {} from PeerId: {}", msg_id, propagation_source); if should_check_score { return self.gossipsub.peer_score(propagation_source) } } Ok(false) => { - warn!(target: "fuel-p2p", "Message with MessageId: {} not found in the Gossipsub Message Cache", msg_id); + tracing::warn!(target: "fuel-p2p", "Message with MessageId: {} not found in the Gossipsub Message Cache", msg_id); } Err(e) => { - error!(target: "fuel-p2p", "Failed to report Message with MessageId: {} with Error: {:?}", msg_id, e); + tracing::error!(target: "fuel-p2p", "Failed to report Message with MessageId: {} with Error: {:?}", msg_id, e); } }