Skip to content

Commit

Permalink
Merge pull request fedimint#3110 from dpc/explicity-req-targets
Browse files Browse the repository at this point in the history
chore: use explicit targets for client requests
  • Loading branch information
elsirion committed Sep 6, 2023
2 parents 51af964 + c3460f6 commit 274baec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fedimint-core/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use fedimint_core::{
apply, async_trait_maybe_send, dyn_newtype_define, NumPeers, OutPoint, PeerId, TransactionId,
};
use fedimint_derive::Decodable;
use fedimint_logging::LOG_NET_API;
use fedimint_logging::{LOG_CLIENT_NET_API, LOG_NET_API};
use futures::stream::FuturesUnordered;
use futures::{Future, StreamExt};
use jsonrpsee_core::client::ClientT;
Expand Down Expand Up @@ -224,7 +224,7 @@ pub trait FederationApiExt: IFederationApi {
let max_delay_ms = 1000;
loop {
let response = futures.next().await;
trace!(?response, method, params = ?AbbreviateDebug(params.to_json()), "Received peer response");
trace!(target: LOG_CLIENT_NET_API, ?response, method, params = ?AbbreviateDebug(params.to_json()), "Received peer response");
match response {
Some(PeerResponse { peer, result }) => {
let result: PeerResult<PeerRet> =
Expand All @@ -235,6 +235,7 @@ pub trait FederationApiExt: IFederationApi {

let strategy_step = strategy.process(peer, result);
trace!(
target: LOG_CLIENT_NET_API,
method,
?params,
?strategy_step,
Expand Down
1 change: 1 addition & 0 deletions fedimint-logging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub const LOG_TEST: &str = "test";
pub const LOG_TIMING: &str = "timing";
pub const LOG_WALLET: &str = "wallet";
pub const LOG_CLIENT: &str = "client";
pub const LOG_CLIENT_NET_API: &str = "client::net::api";
pub const LOG_CLIENT_BACKUP: &str = "client::backup";
pub const LOG_CLIENT_RECOVERY: &str = "client::recovery";
pub const LOG_CLIENT_RECOVERY_MINT: &str = "client::recovery::mint";
Expand Down

0 comments on commit 274baec

Please sign in to comment.