improvement: better log formatting

This commit is contained in:
Greg Heartsfield 2022-09-11 10:22:01 -05:00
parent 217429f538
commit 9ce5057af8
2 changed files with 3 additions and 3 deletions

View File

@ -542,7 +542,7 @@ fn query_from_sub(sub: &Subscription) -> (String, Vec<Box<dyn ToSql>>) {
})
.collect();
let query: String = subqueries_selects.join(" UNION ");
info!("final query string: {}", query);
debug!("final query string: {}", query);
(query, params)
}

View File

@ -455,14 +455,14 @@ async fn nostr_server(
// TODO: serialize at broadcast time, instead of
// once for each consumer.
if let Ok(event_str) = serde_json::to_string(&global_event) {
debug!("sub match: client: {:?}, sub: {:?}, event: {:?}",
debug!("sub match for client: {:?}, sub: {:?}, event: {:?}",
cid, s,
global_event.get_event_id_prefix());
// create an event response and send it
let subesc = s.replace('"', "");
ws_stream.send(Message::Text(format!("[\"EVENT\",\"{}\",{}]", subesc, event_str))).await.ok();
} else {
warn!("could not serialize event {:?}", global_event.get_event_id_prefix());
warn!("could not serialize event: {:?}", global_event.get_event_id_prefix());
}
}
},