mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-17 12:21:38 +00:00
log: fix bug where WithAttrs attributes are not used
This commit is contained in:
parent
9dbaa834bf
commit
37587a7cfc
1 changed files with 2 additions and 2 deletions
|
|
@ -170,7 +170,7 @@ func (h *GlogHandler) handle(ctx context.Context, r slog.Record, origin slog.Han
|
||||||
// Fast path: cache hit
|
// Fast path: cache hit
|
||||||
if lvl, ok := cfg.cache.Load(r.PC); ok {
|
if lvl, ok := cfg.cache.Load(r.PC); ok {
|
||||||
if lvl.(slog.Level) <= r.Level {
|
if lvl.(slog.Level) <= r.Level {
|
||||||
return h.origin.Handle(ctx, r)
|
return origin.Handle(ctx, r)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +191,7 @@ func (h *GlogHandler) handle(ctx context.Context, r slog.Record, origin slog.Han
|
||||||
|
|
||||||
// Handle the message.
|
// Handle the message.
|
||||||
if lvl <= r.Level {
|
if lvl <= r.Level {
|
||||||
return h.origin.Handle(ctx, r)
|
return origin.Handle(ctx, r)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue