From: Dessalines Date: Sat, 3 Oct 2020 14:47:06 +0000 (-0500) Subject: Adding some logging. X-Git-Url: http://these/git/%7B%60%24%7BarchiveUrl%7D/static/%7Bthis.props.banner%7D?a=commitdiff_plain;h=9fa2092a21af18f38fb01206fd81fd958b717446;p=lemmy.git Adding some logging. --- diff --git a/lemmy_apub/src/activity_queue.rs b/lemmy_apub/src/activity_queue.rs index 7602fe2f..68b5c3ab 100644 --- a/lemmy_apub/src/activity_queue.rs +++ b/lemmy_apub/src/activity_queue.rs @@ -174,7 +174,7 @@ where let activity = activity.into_any_base()?; let serialised_activity = serde_json::to_string(&activity)?; - insert_activity(actor.user_id(), serialised_activity.clone(), true, pool).await?; + insert_activity(actor.user_id(), activity.clone(), true, pool).await?; // TODO: it would make sense to create a separate task for each destination server let message = SendActivityTask { diff --git a/lemmy_apub/src/community.rs b/lemmy_apub/src/community.rs index c2b4571f..ad9abaaa 100644 --- a/lemmy_apub/src/community.rs +++ b/lemmy_apub/src/community.rs @@ -1,3 +1,4 @@ +use log::debug; use crate::{ activity_queue::{send_activity_single_dest, send_to_community_followers}, check_actor_domain, @@ -281,6 +282,10 @@ impl ActorType for Community { .unique() .collect(); + // TODO remove this logging line + let inboxes_json = serde_json::to_string_pretty(&inboxes)?; + debug!("Community follower inboxes: {}", inboxes_json); + Ok(inboxes) } diff --git a/lemmy_db/src/activity.rs b/lemmy_db/src/activity.rs index 18b6ef00..6830d566 100644 --- a/lemmy_db/src/activity.rs +++ b/lemmy_db/src/activity.rs @@ -63,7 +63,7 @@ where T: Serialize + Debug, { debug!("inserting activity for user {}: ", user_id); - debug!("{}", serde_json::to_string_pretty(&serde_json::to_value(&data)?)?); + debug!("{}", serde_json::to_string_pretty(&data)?); let activity_form = ActivityForm { user_id, data: serde_json::to_value(&data)?,