mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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.
This commit is contained in:
@@ -119,10 +119,11 @@ func (w *WorkerPool[MsgType]) Queue(msg MsgType) {
|
||||
// Create new process function for msg
|
||||
process := func(ctx context.Context) {
|
||||
if err := w.process(ctx, msg); err != nil {
|
||||
log.WithFields(kv.Fields{
|
||||
kv.Field{K: "type", V: w.wtype},
|
||||
kv.Field{K: "error", V: err},
|
||||
}...).Error("message processing error")
|
||||
log.WithContext(ctx).
|
||||
WithFields(kv.Fields{
|
||||
kv.Field{K: "type", V: w.wtype},
|
||||
kv.Field{K: "error", V: err},
|
||||
}...).Error("message processing error")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user