[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
parent e337aa83b8
commit 8effc77788
13 changed files with 146 additions and 135 deletions

View File

@@ -37,6 +37,8 @@ import (
//
// The library makes this call only after acquiring a lock first.
func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
log.DebugKV(ctx, "id", id)
activityContext := getActivityContext(ctx)
if activityContext.internal {
return nil // Already processed.
@@ -81,9 +83,7 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
return nil
}
// Log at debug level, as lots of these could indicate federation
// issues between remote and this instance, or help with debugging.
log.Debugf(ctx, "received delete for unknown target: %s", uriStr)
log.Debugf(ctx, "unknown iri: %s", uriStr)
return nil
}