From 94badbc83841d2185129d64e7e9aca454efe0b81 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 26 Nov 2018 08:39:15 -0500 Subject: [PATCH] Only log ActivityPub info when debugging --- activitypub.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/activitypub.go b/activitypub.go index 48be9f0..ad8f420 100644 --- a/activitypub.go +++ b/activitypub.go @@ -254,7 +254,9 @@ func handleFetchCollectionInbox(app *app, w http.ResponseWriter, r *http.Request // 2) Errors are propagated to res.Deserialize call below m["@context"] = []string{activitystreams.Namespace} b, _ := json.Marshal(m) - log.Info("Follow: %s", b) + if debugging { + log.Info("Follow: %s", b) + } _, followID := f.GetId() if followID == nil { @@ -287,7 +289,9 @@ func handleFetchCollectionInbox(app *app, w http.ResponseWriter, r *http.Request m["@context"] = []string{activitystreams.Namespace} b, _ := json.Marshal(m) - log.Info("Undo: %s", b) + if debugging { + log.Info("Undo: %s", b) + } a.AppendObject(u.Raw()) _, to = u.GetActor(0)