nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 9ce5057af8927cf41ec742183b3df35c4705f54b
parent 217429f538877c755dd3e528f2150a885c55dace
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Sun, 11 Sep 2022 10:22:01 -0500

improvement: better log formatting

Diffstat:
Msrc/db.rs | 2+-
Msrc/server.rs | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/db.rs b/src/db.rs @@ -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) } diff --git a/src/server.rs b/src/server.rs @@ -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()); } } },