logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 77949d4590b2a82ef6bb4c79f0777962991e28b1
parent 3954dfd4f1881845a60f117a86ef96f3997c6c3c
Author: Mark Felder <feld@feld.me>
Date:   Fri, 29 Dec 2023 00:25:11 -0500

Make the Publisher log error less noisy

Diffstat:

Achangelog.d/publisher_log.change1+
Mlib/pleroma/web/activity_pub/publisher.ex3++-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/changelog.d/publisher_log.change b/changelog.d/publisher_log.change @@ -0,0 +1 @@ +Publisher errors will now emit logs indicating the inbox that was not available for delivery. diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex @@ -119,7 +119,8 @@ defmodule Pleroma.Web.ActivityPub.Publisher do else {_post_result, response} = e -> unless params[:unreachable_since], do: Instances.set_unreachable(inbox) - Logger.error("Failed to publish activity #{id} #{inspect(e)}") + Logger.metadata(activity: id, inbox: inbox, status: code) + Logger.error("Publisher failed to inbox #{inbox} with status #{code}") {:error, response} end end