improvement: log connection details at INFO level

This commit is contained in:
Greg Heartsfield 2023-02-02 11:55:41 -06:00
parent 559541b160
commit 6012b57e95

View File

@ -600,12 +600,12 @@ async fn nostr_server(
// and how many it received from queries. // and how many it received from queries.
let mut client_published_event_count: usize = 0; let mut client_published_event_count: usize = 0;
let mut client_received_event_count: usize = 0; let mut client_received_event_count: usize = 0;
debug!("new client connection (cid: {}, ip: {:?})", cid, conn.ip()); info!("new client connection (cid: {}, ip: {:?})", cid, conn.ip());
let origin = client_info.origin.unwrap_or_else(|| "<unspecified>".into()); let origin = client_info.origin.unwrap_or_else(|| "<unspecified>".into());
let user_agent = client_info let user_agent = client_info
.user_agent .user_agent
.unwrap_or_else(|| "<unspecified>".into()); .unwrap_or_else(|| "<unspecified>".into());
debug!( info!(
"cid: {}, origin: {:?}, user-agent: {:?}", "cid: {}, origin: {:?}, user-agent: {:?}",
cid, origin, user_agent cid, origin, user_agent
); );