[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
This commit is contained in:
kim 2024-09-17 19:35:47 +00:00 committed by GitHub
commit 8effc77788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 146 additions and 135 deletions

View file

@ -27,7 +27,6 @@ import (
"errors"
"fmt"
"codeberg.org/gruf/go-logger/v2/level"
"github.com/superseriousbusiness/activity/streams/vocab"
"github.com/superseriousbusiness/gotosocial/internal/ap"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
@ -37,15 +36,7 @@ import (
)
func (f *federatingDB) Move(ctx context.Context, move vocab.ActivityStreamsMove) error {
if log.Level() >= level.DEBUG {
i, err := marshalItem(move)
if err != nil {
return err
}
l := log.WithContext(ctx).
WithField("move", i)
l.Debug("entering Move")
}
log.DebugKV(ctx, "move", serialize{move})
activityContext := getActivityContext(ctx)
if activityContext.internal {