Adding some logging.

pull/1177/head
Dessalines 2020-10-03 09:47:06 -05:00
parent 2e2b6eacd7
commit 9fa2092a21
3 changed files with 7 additions and 2 deletions

View File

@ -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 {

View File

@ -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)
}

View File

@ -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)?,