Skip to content

Introduce runtime switchable logging component for the compiler#16871

Draft
matheusaaguiar wants to merge 2 commits into
developfrom
logging
Draft

Introduce runtime switchable logging component for the compiler#16871
matheusaaguiar wants to merge 2 commits into
developfrom
logging

Conversation

@matheusaaguiar

Copy link
Copy Markdown
Contributor

Adds runtime-switchable logging functionality to the compiler.
Loggers are named hierarchically with dot-separated categories (e.g. yul.ssa.stacklayout), obtained lazily and cached in a process-wide LoggerRegistry.
Loggers are declared at call sites with DEFINE_LOGGER plus the solTrace/solDebug/solWarn macros.
Each logger has an effective severity (trace < debug < warn < off) resolved from per-prefix rules where the most-specific matching prefix wins. The default severity is off.
Output lines are prefixed with [<level> <category>] and written to stderr by default.
The loggers can be preset and configured through the CLI (--log-level, --log, --log-output).

@matheusaaguiar
matheusaaguiar requested a review from clonker July 15, 2026 04:37
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.

1 participant