summaryrefslogtreecommitdiff
path: root/internal/typeutils/astointernal.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/typeutils/astointernal.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/typeutils/astointernal.go')
-rw-r--r--internal/typeutils/astointernal.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go
index 2ed1d52d3..459f3402d 100644
--- a/internal/typeutils/astointernal.go
+++ b/internal/typeutils/astointernal.go
@@ -243,7 +243,8 @@ func (c *converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab
}
status.URI = uriProp.GetIRI().String()
- l := log.WithField("statusURI", status.URI)
+ l := log.WithContext(ctx).
+ WithField("statusURI", status.URI)
// web url for viewing this status
if statusURL, err := ap.ExtractURL(statusable); err == nil {