mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Use context logging more to ensure context vars are present in log lines (#1039)
This commit is contained in:
@@ -181,8 +181,9 @@ func (a *lbAgent) Submit(callI Call) error {
|
||||
if buf != nil {
|
||||
defer bufPool.Put(buf)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
logrus.WithError(err).Error("Failed to process call body")
|
||||
common.Logger(call.req.Context()).WithError(err).Error("Failed to process call body")
|
||||
return a.handleCallEnd(ctx, call, err, true)
|
||||
}
|
||||
|
||||
@@ -192,7 +193,7 @@ func (a *lbAgent) Submit(callI Call) error {
|
||||
// isStarted=true means we will call Call.End().
|
||||
err = a.placer.PlaceCall(a.rp, ctx, call)
|
||||
if err != nil {
|
||||
logrus.WithError(err).Error("Failed to place call")
|
||||
common.Logger(call.req.Context()).WithError(err).Error("Failed to place call")
|
||||
}
|
||||
|
||||
return a.handleCallEnd(ctx, call, err, true)
|
||||
|
||||
Reference in New Issue
Block a user