Skip to content

Commit

Permalink
reduce logs to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Apr 25, 2024
1 parent a25b6fd commit 6338320
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions applications/tari_generate/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct ScaffoldArgs {
#[clap(long, short = 'c', alias = "config")]
pub generator_config_file: Option<PathBuf>,
#[clap(long, short = 'a')]
address: String,
template_address: String,
#[clap(long, short = 'j')]
dan_testing_jrpc_url: String,
}
Expand Down Expand Up @@ -284,7 +284,7 @@ async fn scaffold(args: ScaffoldArgs) -> anyhow::Result<()> {
output_path: "output/".into(),
liquid: Some(generators::LiquidGeneratorOpts {
skip_format: false,
variables: vec![("template_address".to_string(), Value::String(args.address.clone()))]
variables: vec![("template_address".to_string(), Value::String(args.template_address.clone()))]
.into_iter()
.collect(),
}),
Expand All @@ -307,7 +307,7 @@ async fn scaffold(args: ScaffoldArgs) -> anyhow::Result<()> {
let request = json!({
"jsonrpc" : "2.0",
"method": "get_template",
"params": [hex::decode(args.address)?],
"params": [hex::decode(args.template_address)?],
"id": 1
});
let response = reqwest::Client::new()
Expand Down
8 changes: 6 additions & 2 deletions applications/tari_indexer/log4rs_sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,16 @@ loggers:
- stdout
additive: false

tari::dan::networking:
level: debug
appenders:
- network
additive: true

tari::dan:
level: info
appenders:
- dan_layer
- stdout
additive: false

tari::indexer:
level: info
Expand Down
3 changes: 2 additions & 1 deletion networking/core/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ where
relay_peer_id, renewal, limit
);
},

RelayClient(event) => {
info!(target: LOG_TARGET, "🌎️ RelayClient event: {:?}", event);
},
Expand Down Expand Up @@ -905,7 +906,7 @@ where
let _ignore = reply.send(Ok(NegotiatedSubstream::new(peer_id, protocol, stream)));
},
InboundSubstreamOpen { notification } => {
info!(target: LOG_TARGET, "📥 Inbound substream open: protocol={}", notification.protocol);
debug!(target: LOG_TARGET, "📥 Inbound substream open: protocol={}", notification.protocol);
self.substream_notifiers.notify(notification);
},
InboundFailure {
Expand Down
6 changes: 3 additions & 3 deletions networking/rpc_framework/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ where
}

fn on_session_complete(&mut self, node_id: &PeerId) {
info!(target: LOG_TARGET, "Session complete for {}", node_id);
debug!(target: LOG_TARGET, "Session complete for {}", node_id);
if let Some(v) = self.sessions.get_mut(node_id) {
*v -= 1;
if *v == 0 {
Expand Down Expand Up @@ -416,7 +416,7 @@ where

match self.new_session_for(peer_id) {
Ok(num_sessions) => {
info!(
debug!(
target: LOG_TARGET,
"NEW SESSION for {} ({} active) ", peer_id, num_sessions
);
Expand Down Expand Up @@ -446,7 +446,7 @@ where
#[cfg(feature = "metrics")]
num_sessions.inc();
service.start().await;
info!(target: LOG_TARGET, "END OF SESSION for {} ", peer_id,);
debug!(target: LOG_TARGET, "END OF SESSION for {} ", peer_id,);
#[cfg(feature = "metrics")]
num_sessions.dec();

Expand Down

0 comments on commit 6338320

Please sign in to comment.