mirror of
https://github.com/apple/swift-log
synced 2026-11-23 03:44:22 +00:00
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 implementation.