Skip to content

Commit 66180c8

Browse files
committed
fix: correct receiver name in LoggerWithContext Handle method
1 parent 2c05406 commit 66180c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/commons/log_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ type LoggerWithContext struct {
2020
slog.Handler
2121
}
2222

23-
func (g *LoggerWithContext) Handle(ctx context.Context, r slog.Record) error {
23+
func (lc *LoggerWithContext) Handle(ctx context.Context, r slog.Record) error {
2424
if workerName, ok := ctx.Value(workerKey).(string); ok {
2525
r.AddAttrs(slog.String("worker", workerName))
2626
}
2727

2828
// Call the parent handler
29-
return g.Handler.Handle(ctx, r)
29+
return lc.Handler.Handle(ctx, r)
3030
}
3131

3232
func ConfigureLog(level slog.Leveler) {

0 commit comments

Comments
 (0)