From 13cc24b5cd98dabd8e6caafbf06fedb7d9805af5 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Sun, 15 Jan 2023 15:42:27 -0600 Subject: [PATCH] improvement: log blacklisted events --- src/db.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/db.rs b/src/db.rs index 85b480d..56a2c1c 100644 --- a/src/db.rs +++ b/src/db.rs @@ -210,8 +210,8 @@ pub async fn db_writer( // TODO: incorporate delegated pubkeys // if the event address is not in allowed_addrs. if !allowed_addrs.contains(&event.pubkey) { - info!( - "Rejecting event {}, unauthorized author", + debug!( + "rejecting event: {}, unauthorized author", event.get_event_id_prefix() ); notice_tx @@ -228,9 +228,10 @@ pub async fn db_writer( let kinds_blacklist = &settings.limits.event_kind_blacklist.clone(); if let Some(event_kind_blacklist) = kinds_blacklist { if event_kind_blacklist.contains(&event.kind) { - info!( - "Rejecting event {}, blacklisted kind", - &event.get_event_id_prefix() + debug!( + "rejecting event: {}, blacklisted kind: {}", + &event.get_event_id_prefix(), + &event.kind ); notice_tx .try_send(Notice::blocked( @@ -314,7 +315,7 @@ pub async fn db_writer( notice_tx.try_send(Notice::duplicate(event.id)).ok(); } else { info!( - "persisted event: {:?} (kind={}) from: {:?} in: {:?}", + "persisted event: {:?} (kind: {}) from: {:?} in: {:?}", event.get_event_id_prefix(), event.kind, event.get_author_prefix(),