diff options
Diffstat (limited to 'internal/api/client')
-rw-r--r-- | internal/api/client/media/mediacreate_test.go | 2 | ||||
-rw-r--r-- | internal/api/client/media/mediaupdate_test.go | 2 | ||||
-rw-r--r-- | internal/api/client/streaming/stream.go | 11 |
3 files changed, 8 insertions, 7 deletions
diff --git a/internal/api/client/media/mediacreate_test.go b/internal/api/client/media/mediacreate_test.go index 320636721..8a94646ac 100644 --- a/internal/api/client/media/mediacreate_test.go +++ b/internal/api/client/media/mediacreate_test.go @@ -100,7 +100,7 @@ func (suite *MediaCreateTestSuite) SetupSuite() { func (suite *MediaCreateTestSuite) TearDownSuite() { if err := suite.db.Stop(context.Background()); err != nil { - log.Panicf("error closing db connection: %s", err) + log.Panicf(nil, "error closing db connection: %s", err) } } diff --git a/internal/api/client/media/mediaupdate_test.go b/internal/api/client/media/mediaupdate_test.go index 1425d80ef..8f4470132 100644 --- a/internal/api/client/media/mediaupdate_test.go +++ b/internal/api/client/media/mediaupdate_test.go @@ -98,7 +98,7 @@ func (suite *MediaUpdateTestSuite) SetupSuite() { func (suite *MediaUpdateTestSuite) TearDownSuite() { if err := suite.db.Stop(context.Background()); err != nil { - log.Panicf("error closing db connection: %s", err) + log.Panicf(nil, "error closing db connection: %s", err) } } diff --git a/internal/api/client/streaming/stream.go b/internal/api/client/streaming/stream.go index 99d8b23e1..a03f36d16 100644 --- a/internal/api/client/streaming/stream.go +++ b/internal/api/client/streaming/stream.go @@ -166,11 +166,12 @@ func (m *Module) StreamGETHandler(c *gin.Context) { return } - l := log.WithFields(kv.Fields{ - {"account", account.Username}, - {"streamID", stream.ID}, - {"streamType", streamType}, - }...) + l := log.WithContext(c.Request.Context()). + WithFields(kv.Fields{ + {"account", account.Username}, + {"streamID", stream.ID}, + {"streamType", streamType}, + }...) // Upgrade the incoming HTTP request, which hijacks the underlying // connection and reuses it for the websocket (non-http) protocol. |