summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/update.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-09-17 19:35:47 +0000
committerLibravatar GitHub <noreply@github.com>2024-09-17 21:35:47 +0200
commit8effc77788a201efe87636c94e16436da26b5199 (patch)
treea848340e71b2bd9a48c45c6d3376b9b0486eb98f /internal/federation/federatingdb/update.go
parent[bugfix] Fix pending approval check (#3316) (diff)
downloadgotosocial-8effc77788a201efe87636c94e16436da26b5199.tar.xz
[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
Diffstat (limited to 'internal/federation/federatingdb/update.go')
-rw-r--r--internal/federation/federatingdb/update.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/internal/federation/federatingdb/update.go b/internal/federation/federatingdb/update.go
index 16ecf3443..a2a9777d1 100644
--- a/internal/federation/federatingdb/update.go
+++ b/internal/federation/federatingdb/update.go
@@ -21,7 +21,6 @@ import (
"context"
"errors"
- "codeberg.org/gruf/go-logger/v2/level"
"github.com/superseriousbusiness/activity/streams/vocab"
"github.com/superseriousbusiness/gotosocial/internal/ap"
"github.com/superseriousbusiness/gotosocial/internal/config"
@@ -42,16 +41,7 @@ import (
//
// The library makes this call only after acquiring a lock first.
func (f *federatingDB) Update(ctx context.Context, asType vocab.Type) error {
- l := log.WithContext(ctx)
-
- if log.Level() >= level.DEBUG {
- i, err := marshalItem(asType)
- if err != nil {
- return err
- }
- l = l.WithField("update", i)
- l.Debug("entering Update")
- }
+ log.DebugKV(ctx, "update", serialize{asType})
activityContext := getActivityContext(ctx)
if activityContext.internal {
@@ -69,6 +59,7 @@ func (f *federatingDB) Update(ctx context.Context, asType vocab.Type) error {
return f.updateStatusable(ctx, receivingAcct, requestingAcct, statusable)
}
+ log.Debugf(ctx, "unhandled object type: %T", asType)
return nil
}