Skip to content

fix: standardise LOG_LEVEL across all execution-client entrypoints#1006

Open
erhnysr wants to merge 1 commit intobase:mainfrom
erhnysr:fix/entrypoint-log-level-validation
Open

fix: standardise LOG_LEVEL across all execution-client entrypoints#1006
erhnysr wants to merge 1 commit intobase:mainfrom
erhnysr:fix/entrypoint-log-level-validation

Conversation

@erhnysr
Copy link
Copy Markdown

@erhnysr erhnysr commented Apr 11, 2026

Problem

All three execution-client entrypoints (reth, geth, nethermind) handle log verbosity differently, making it impossible to set a consistent log level across client types with a single environment variable.

Specific issues:

  1. reth-entrypoint: an unrecognised LOG_LEVEL value silently fell through to the default (info) with only an echo warning — no stderr, no exit code. Operators mistyping INFO or WARNING got no feedback.

  2. geth-entrypoint: only GETH_VERBOSITY (numeric, 05) was supported. There was no human-readable alternative.

  3. nethermind-entrypoint: only Nethermind-specific capitalised level names (Info, Debug, etc.) were accepted via NETHERMIND_LOG_LEVEL. No shared interface with the other clients.

Meanwhile the consensus side already supports OP_NODE_LOG_LEVEL=info — there was no equivalent for execution clients.

Solution

  • reth: change the wildcard case arm to print an error to stderr and exit 1
  • geth: add a LOG_LEVEL pre-processing block that maps error/warn/info/debug/trace → numeric verbosity; falls back to GETH_VERBOSITY when LOG_LEVEL is unset
  • nethermind: same approach, mapping to Nethermind's Error/Warn/Info/Debug/Trace strings; falls back to NETHERMIND_LOG_LEVEL

Result

Operators can now set LOG_LEVEL=debug once in their .env file and have it apply uniformly across all three execution clients.

Backwards compatibility

All existing GETH_VERBOSITY and NETHERMIND_LOG_LEVEL variables continue to work unchanged. LOG_LEVEL only takes effect when explicitly set.

All three execution-client entrypoints handled log verbosity differently,
making it hard to set consistent log levels across client types via a
single environment variable.

Problems fixed:

1. reth-entrypoint: an unrecognised LOG_LEVEL silently fell through to the
   default (info/vvv) with only an echo warning. Operators mistyping
   'INFO' or 'WARNING' would get no indication the value was ignored.
   Changed the wildcard arm to print to stderr and exit 1.

2. geth-entrypoint: only GETH_VERBOSITY (numeric, 0-5) was supported.
   Added LOG_LEVEL pre-processing that maps error/warn/info/debug/trace
   to the corresponding numeric verbosity. GETH_VERBOSITY is used as
   fallback when LOG_LEVEL is not set, preserving backwards compatibility.

3. nethermind-entrypoint: same issue as geth. Added LOG_LEVEL mapping
   block translating to Nethermind's Error/Warn/Info/Debug/Trace strings.

After this change operators can set LOG_LEVEL=debug once in their .env
file and have it apply uniformly across all three clients, matching the
behaviour that already exists for OP_NODE_LOG_LEVEL on the consensus side.

All existing GETH_VERBOSITY / NETHERMIND_LOG_LEVEL variables continue to
work unchanged.
@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants