improved federatingdb logging in cases of unknown iri / types, add new log methods

This commit is contained in:
kim 2024-09-17 17:41:22 +01:00
commit 26b8fa6dd7
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.Warnf(ctx, "unknown iri: %s", uriStr)
return nil
}