mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-12-22 16:35:51 -05:00
improvement: reduce logging
This commit is contained in:
parent
168cf513ac
commit
53c2a8051c
|
@ -715,7 +715,10 @@ pub async fn db_query(
|
|||
let mut row_count: usize = 0;
|
||||
// generate SQL query
|
||||
let (q, p) = query_from_sub(&sub);
|
||||
debug!("SQL generated in {:?}", start.elapsed());
|
||||
let sql_gen_elapsed = start.elapsed();
|
||||
if sql_gen_elapsed > Duration::from_millis(10) {
|
||||
debug!("SQL (slow) generated in {:?}", start.elapsed());
|
||||
}
|
||||
// show pool stats
|
||||
log_pool_stats("reader", &pool);
|
||||
// cutoff for displaying slow queries
|
||||
|
|
|
@ -248,10 +248,10 @@ pub fn start_server(settings: Settings, shutdown_rx: MpscReceiver<()>) -> Result
|
|||
// limit concurrent SQLite blocking threads
|
||||
.max_blocking_threads(settings.limits.max_blocking_threads)
|
||||
.on_thread_start(|| {
|
||||
debug!("started new thread");
|
||||
trace!("started new thread");
|
||||
})
|
||||
.on_thread_stop(|| {
|
||||
debug!("stopping thread");
|
||||
trace!("stopping thread");
|
||||
})
|
||||
.build()
|
||||
.unwrap();
|
||||
|
@ -538,7 +538,7 @@ 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 for client: {}, sub: {:?}, event: {:?}",
|
||||
trace!("sub match for client: {}, sub: {:?}, event: {:?}",
|
||||
cid, s,
|
||||
global_event.get_event_id_prefix());
|
||||
// create an event response and send it
|
||||
|
|
Loading…
Reference in New Issue
Block a user