Skip to content

fix: convert legacy log level in debug_verbosity (ethereum#29356) - #124

Merged
hmlee-wm merged 1 commit into
devfrom
fix/debug-verbosity-legacy-level-conversion
Sep 15, 2026
Merged

hmlee-wm merged 1 commit into
devfrom
fix/debug-verbosity-legacy-level-conversion

Conversation

@hmlee-wm

@hmlee-wm hmlee-wm commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports ethereum#29356. debug_verbosity was casting the legacy level integer directly to slog.Level instead of converting it. Since legacy levels (0=Crit, 5=Trace) and slog levels (Crit=12, Trace=-8) run in opposite directions, calling debug_verbosity(0) set Info instead of Crit.

Upstream References

PR Description
#29356 internal/debug: convert legacy log level value in debug_verbosity

Problem

slog.Level(level) treats the raw integer as a slog level value directly. Legacy level 0 maps to slog.Level(0) which is Info, not Crit. The log.FromLegacyLevel helper already exists in the codebase for exactly this conversion.

Changes

  • internal/debug/api.go: replace glogger.Verbosity(slog.Level(level)) with glogger.Verbosity(log.FromLegacyLevel(level))

…9356)

(cherry picked from commit 9cb8de87037be7c38343b2f84c534887e7525c5d)
@hmlee-wm hmlee-wm self-assigned this Sep 4, 2026
@hmlee-wm hmlee-wm added the bug Something isn't working label Sep 4, 2026

@0xmhha 0xmhha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@colinkim colinkim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eomti-wm eomti-wm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hmlee-wm
hmlee-wm merged commit e9747d3 into dev Sep 15, 2026
3 checks passed
@hmlee-wm
hmlee-wm deleted the fix/debug-verbosity-legacy-level-conversion branch September 15, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants