summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/util.go
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-02-17 20:05:43 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-17 19:05:43 +0000
commitb4d18887d3deec8556f8b2de2369a768df01eb29 (patch)
tree9fd25cbeac8ef88fdf2e54b2efe5df58e81fa083 /internal/federation/federatingdb/util.go
parent[bug] Pass context in logging middleware (#1514) (diff)
downloadgotosocial-b4d18887d3deec8556f8b2de2369a768df01eb29.tar.xz
[chore] Update more log calls to include context (#1517)
In #1476 we updated log.WithFields() but we forgot about log.WithField(). Also updates a few explicit log.Entry{} creations.
Diffstat (limited to 'internal/federation/federatingdb/util.go')
-rw-r--r--internal/federation/federatingdb/util.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/federation/federatingdb/util.go b/internal/federation/federatingdb/util.go
index 1eb27dc03..64f32d39c 100644
--- a/internal/federation/federatingdb/util.go
+++ b/internal/federation/federatingdb/util.go
@@ -69,7 +69,8 @@ func (f *federatingDB) NewID(ctx context.Context, t vocab.Type) (idURL *url.URL,
if err != nil {
return nil, err
}
- l := log.WithField("newID", i)
+ l := log.WithContext(ctx).
+ WithField("newID", i)
l.Debug("entering NewID")
}