Skip to content

[SLG-0002]: Compile-time log level elimination using traits#391

Merged
kukushechkin merged 3 commits intoapple:mainfrom
kukushechkin:SLG-0002-compile-time-log-level-elimination
Dec 11, 2025
Merged

[SLG-0002]: Compile-time log level elimination using traits#391
kukushechkin merged 3 commits intoapple:mainfrom
kukushechkin:SLG-0002-compile-time-log-level-elimination

Conversation

@kukushechkin
Copy link
Copy Markdown
Contributor

Enable compile-time elimination of log levels to achieve zero runtime overhead for logs that will never be needed in production.

Motivation:

In production deployments, applications often know in advance which log levels will never be needed. For example, a production service typically only needs warning and above, while trace and debug levels are exclusively useful during development. Currently, even with the log level set to .warning at runtime, the code for trace and debug statements still exists in the binary and incurs overhead.

Modifications:

The "SLG-0002: Compile-time log level elimination using traits" proposal doc added.

Result:

The proposal is ready for review.

@kukushechkin kukushechkin added the semver/none No version bump required. label Dec 3, 2025
@kukushechkin kukushechkin merged commit bc386b9 into apple:main Dec 11, 2025
60 checks passed
@kukushechkin kukushechkin deleted the SLG-0002-compile-time-log-level-elimination branch December 11, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants