Przeglądaj źródła

Revert "missing log targets"

This reverts commit 6414d55b7e20e6e85327f792b2ea26e1f0f1598d.
x 3 lat temu
rodzic
commit
988a622403

+ 1 - 3
src/consensus/proto/protocol_proposal.rs

@@ -45,7 +45,7 @@ impl ProtocolProposal {
         state: ValidatorStatePtr,
         p2p: P2pPtr,
     ) -> Result<ProtocolBasePtr> {
-        debug!(target: "consensus::protocol_proposal::init()", "Adding ProtocolProposal to the protocol registry");
+        debug!("Adding ProtocolProposal to the protocol registry");
         let msg_subsystem = channel.get_message_subsystem();
         msg_subsystem.add_dispatch::<BlockProposal>().await;
 
@@ -95,7 +95,6 @@ impl ProtocolProposal {
                             self.p2p.broadcast_with_exclude(proposal_copy, &exclude_list).await
                         {
                             error!(
-                                target: "consensus::protocol_proposal::init()",
                                 target: "consensus::protocol_proposal::init()",
                                 "ProtocolProposal::handle_receive_proposal(): proposal broadcast fail: {}",
                                 e
@@ -105,7 +104,6 @@ impl ProtocolProposal {
                 }
                 Err(e) => {
                     error!(
-                        target: "consensus::protocol_proposal::init()",
                         target: "consensus::protocol_proposal::init()",
                         "ProtocolProposal::handle_receive_proposal(): receive_proposal error: {}",
                         e

+ 1 - 9
src/consensus/proto/protocol_sync.rs

@@ -81,7 +81,7 @@ impl ProtocolSync {
     }
 
     async fn handle_receive_request(self: Arc<Self>) -> Result<()> {
-        debug!(target: "consensus::protocol_sync::handle_receive_request()", "ProtocolSync::handle_receive_request() [START]");
+        debug!("ProtocolSync::handle_receive_request() [START]");
         loop {
             let order = match self.request_sub.receive().await {
                 Ok(v) => v,
@@ -135,7 +135,6 @@ impl ProtocolSync {
                     let slot = participating.unwrap();
                     if current >= slot {
                         debug!(
-                            target: "consensus::protocol_sync::handle_receive_request()",
                             target: "consensus::protocol_sync::handle_receive_request()",
                             "ProtocolSync::handle_receive_block(): node runs in consensus mode, skipping..."
                         );
@@ -156,7 +155,6 @@ impl ProtocolSync {
                             self.p2p.broadcast_with_exclude(info_copy, &exclude_list).await
                         {
                             error!(
-                                target: "consensus::protocol_sync::handle_receive_request()",
                                 target: "consensus::protocol_sync::handle_receive_request()",
                                 "ProtocolSync::handle_receive_block(): p2p broadcast fail: {}",
                                 e
@@ -178,7 +176,6 @@ impl ProtocolSync {
                 Ok(v) => v,
                 Err(e) => {
                     debug!(
-                        target: "consensus::protocol_sync::handle_receive_request()",
                         target: "consensus::protocol_sync::handle_receive_request()",
                         "ProtocolSync::handle_receive_slot_checkpoint_request(): recv fail: {}",
                         e
@@ -205,7 +202,6 @@ impl ProtocolSync {
                 }
             };
             debug!(
-                target: "consensus::protocol_sync::handle_receive_request()",
                 target: "consensus::protocol_sync::handle_receive_request()",
                 "ProtocolSync::handle_receive_slot_checkpoint_request(): Found {} slot checkpoints",
                 slot_checkpoints.len()
@@ -214,7 +210,6 @@ impl ProtocolSync {
             let response = SlotCheckpointResponse { slot_checkpoints };
             if let Err(e) = self.channel.send(response).await {
                 error!(
-                    target: "consensus::protocol_sync::handle_receive_request()",
                     target: "consensus::protocol_sync::handle_receive_request()",
                     "ProtocolSync::handle_receive_slot_checkpoint_request(): channel send fail: {}",
                     e
@@ -247,7 +242,6 @@ impl ProtocolSync {
                     let slot = participating.unwrap();
                     if current >= slot {
                         debug!(
-                            target: "consensus::protocol_sync::handle_receive_request()",
                             target: "consensus::protocol_sync::handle_receive_request()",
                             "ProtocolSync::handle_receive_block(): node runs in consensus mode, skipping..."
                         );
@@ -257,7 +251,6 @@ impl ProtocolSync {
             }
 
             info!(
-                target: "consensus::protocol_sync::handle_receive_request()",
                 target: "consensus::protocol_sync::handle_receive_request()",
                 "ProtocolSync::handle_receive_slot_checkpoint(): Received slot checkpoint: {}",
                 slot_checkpoint.slot
@@ -281,7 +274,6 @@ impl ProtocolSync {
                             .await
                         {
                             error!(
-                                target: "consensus::protocol_sync::handle_receive_request()",
                                 target: "consensus::protocol_sync::handle_receive_request()",
                                 "ProtocolSync::handle_receive_slot_checkpoint(): p2p broadcast fail: {}",
                                 e

+ 1 - 2
src/consensus/proto/protocol_sync_consensus.rs

@@ -68,7 +68,7 @@ impl ProtocolSyncConsensus {
     }
 
     async fn handle_receive_request(self: Arc<Self>) -> Result<()> {
-        debug!(target: "consensus::protocol_sync_consensus::handle_receive_request()", "ProtocolSyncConsensus::handle_receive_request() [START]");
+        debug!("ProtocolSyncConsensus::handle_receive_request() [START]");
         loop {
             let req = match self.request_sub.receive().await {
                 Ok(v) => v,
@@ -119,7 +119,6 @@ impl ProtocolSyncConsensus {
             };
 
             debug!(
-                target: "consensus::protocol_sync_consensus::handle_receive_request()",
                 target: "consensus::protocol_sync_consensus::handle_receive_request()",
                 "ProtocolSyncConsensuss::handle_receive_slot_checkpoints_request() received {:?}",
                 req

+ 1 - 1
src/consensus/proto/protocol_tx.rs

@@ -53,7 +53,7 @@ impl ProtocolTx {
         state: ValidatorStatePtr,
         p2p: P2pPtr,
     ) -> Result<ProtocolBasePtr> {
-        debug!(target: "consensus::protocol_tx::init()", "Adding ProtocolTx to the protocol registry");
+        debug!("Adding ProtocolTx to the protocol registry");
         let msg_subsystem = channel.get_message_subsystem();
         msg_subsystem.add_dispatch::<Transaction>().await;
 

+ 1 - 1
src/net/hosts.rs

@@ -59,7 +59,7 @@ impl Hosts {
 
     /// Add a new host to the host list, after filtering.
     pub async fn store(&self, input_addrs: Vec<Url>) {
-        debug!(target: "net::hosts::store()", "hosts::store() [Start]");
+        debug!(target: "net", "hosts::store() [Start]");
         let addrs = if !self.localnet {
             let filtered = filter_localnet(input_addrs);
             let filtered = filter_invalid(&self.ipv4_range, &self.ipv6_range, filtered);

+ 1 - 2
src/net/p2p.rs

@@ -156,7 +156,7 @@ impl P2p {
     /// Invoke startup and seeding sequence. Call from constructing thread.
     // ANCHOR: start
     pub async fn start(self: Arc<Self>, executor: Arc<Executor<'_>>) -> Result<()> {
-        debug!(target: "net::p2p::start()", "P2p::start() [BEGIN]");
+        debug!(target: "net", "P2p::start() [BEGIN]");
 
         *self.state.lock().await = P2pState::Start;
 
@@ -313,7 +313,6 @@ impl P2p {
                 msg = subscriber.receive().fuse() => {
                         if let Err(e) = msg {
                             warn!(
-                                target: "net::p2p::start()",
                                 target: "net::p2p::start()",
                                 "P2p::wait_for_outbound(): Outbound connection failed [{}]: {}",
                                 addr, e

+ 1 - 1
src/net/protocol/protocol_address.rs

@@ -89,7 +89,7 @@ impl ProtocolAddress {
     /// address messages on the address subsciption. Adds the recieved
     /// addresses to the list of hosts.
     async fn handle_receive_addrs(self: Arc<Self>) -> Result<()> {
-        debug!(target: "net::protocol_address::handle_receive_addrs()", "ProtocolAddress::handle_receive_addrs() [START]");
+        debug!(target: "net", "ProtocolAddress::handle_receive_addrs() [START]");
         loop {
             let addrs_msg = self.addrs_sub.receive().await?;
             debug!(target: "net::protocol_address::handle_receive_addrs()", "ProtocolAddress::handle_receive_addrs() received {} addrs", addrs_msg.addrs.len());

+ 1 - 1
src/net/protocol/protocol_ping.rs

@@ -72,7 +72,7 @@ impl ProtocolPing {
     /// sends a ping message with a random nonce. Loop starts a timer, waits
     /// for the pong reply and insures the nonce is the same.
     async fn run_ping_pong(self: Arc<Self>) -> Result<()> {
-        debug!(target: "net::protocol_ping::run_ping_pong()", "ProtocolPing::run_ping_pong() [START]");
+        debug!(target: "net", "ProtocolPing::run_ping_pong() [START]");
         loop {
             // Wait channel_heartbeat amount of time.
             sleep(self.settings.channel_heartbeat_seconds.into()).await;

+ 1 - 1
src/net/protocol/protocol_seed.rs

@@ -65,7 +65,7 @@ impl ProtocolSeed {
         }
 
         let ext_addrs = self.settings.external_addr.clone();
-        debug!(target: "net::protocol_seed::send_self_address()", "ProtocolSeed::send_self_address() ext_addrs={:?}", ext_addrs);
+        debug!(target: "net", "ProtocolSeed::send_self_address() ext_addrs={:?}", ext_addrs);
         let ext_addr_msg = message::ExtAddrsMessage { ext_addrs };
         self.channel.clone().send(ext_addr_msg).await
     }

+ 1 - 2
src/net/protocol/protocol_version.rs

@@ -64,7 +64,7 @@ impl ProtocolVersion {
     /// and wait for version acknowledgement. Wait for version info and send
     /// version acknowledgement.
     pub async fn run(self: Arc<Self>, executor: Arc<Executor<'_>>) -> Result<()> {
-        debug!(target: "net::protocol_version::run()", "ProtocolVersion::run() [START]");
+        debug!(target: "net", "ProtocolVersion::run() [START]");
         // Start timer
         // Send version, wait for verack
         // Wait for version, send verack
@@ -131,7 +131,6 @@ impl ProtocolVersion {
                         app_versions[1] != verack_msg_versions[1]
                     {
                         error!(
-                            target: "net::protocol_version::run()",
                             target: "net::protocol_version::run()",
                             "ProtocolVersion::send_version() [Wrong app version from ({}). Disconnecting from channel.]",
                             self.channel.address()

+ 1 - 1
src/runtime/import/db.rs

@@ -78,7 +78,7 @@ pub(crate) fn db_init(ctx: FunctionEnvMut<Env>, ptr: WasmPtr<u8>, len: u32) -> i
             let contract_id = &env.contract_id;
 
             let Ok(mem_slice) = ptr.slice(&memory_view, len) else {
-                error!(target: "runtime::db::db_init()", "Failed to make slice from ptr");
+                error!(target: "wasm_runtime::db_init", "Failed to make slice from ptr");
                 return DB_INIT_FAILED
             };