From 8effc77788a201efe87636c94e16436da26b5199 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Tue, 17 Sep 2024 19:35:47 +0000 Subject: [chore] improved federatingdb logging in cases of unknown iri / types (#3313) * improved federatingdb logging in cases of unknown iri / types, add new log methods * whoops; forgot to wrap log argument in serialize{} ! * use debug instead of warn level * switch last entry to Debug --- internal/federation/federatingdb/get.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'internal/federation/federatingdb/get.go') diff --git a/internal/federation/federatingdb/get.go b/internal/federation/federatingdb/get.go index 5dcebb877..8ba10a4f9 100644 --- a/internal/federation/federatingdb/get.go +++ b/internal/federation/federatingdb/get.go @@ -22,7 +22,6 @@ import ( "fmt" "net/url" - "codeberg.org/gruf/go-kv" "github.com/superseriousbusiness/activity/streams/vocab" "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/superseriousbusiness/gotosocial/internal/uris" @@ -32,9 +31,7 @@ import ( // // The library makes this call only after acquiring a lock first. func (f *federatingDB) Get(ctx context.Context, id *url.URL) (value vocab.Type, err error) { - l := log.WithContext(ctx). - WithFields(kv.Fields{{"id", id}}...) - l.Debug("entering Get") + log.DebugKV(ctx, "id", id) switch { -- cgit v1.2.3