mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-07 11:55:13 +00:00
log: allow --vmodule to downgrade the log level
This commit is contained in:
parent
54f72c796f
commit
68d523ccdd
1 changed files with 0 additions and 5 deletions
|
|
@ -179,11 +179,6 @@ func (h *GlogHandler) WithGroup(name string) slog.Handler {
|
|||
// Handle implements slog.Handler, filtering a log record through the global,
|
||||
// local and backtrace filters, finally emitting it if either allow it through.
|
||||
func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error {
|
||||
// If the global log level allows, fast track logging
|
||||
if slog.Level(h.level.Load()) <= r.Level {
|
||||
return h.origin.Handle(context.Background(), r)
|
||||
}
|
||||
|
||||
// Check callsite cache for previously calculated log levels
|
||||
h.lock.RLock()
|
||||
lvl, ok := h.siteCache[r.PC]
|
||||
|
|
|
|||
Loading…
Reference in a new issue