mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
454237a083
When building the `OSLog` module, look for a variable named
`osLogStringSectionName`. It must have a string literal as its
initializer, which provides the section name where the log strings
should be emitted. The `OSLog` module should contain something like
this:
let osLogStringSectionName = "__TEXT,__logit"
When not present, the compiler will default to
`__TEXT,__oslogstring,cstring_literals`, which was previously the
hardcoded section name. Now, OSLog can customize the name.
Implements rdar://171571056
505 B
505 B
OSLog module (OSLog)
The OSLog module defines logging facilities that integrate with the Swift compiler. This module is provided by the platform vendor and integrates with the system logging facilities. The Swift OSLog module should provide a module-scope variable declaration that specifies which section the logging strings should be emitted into. For example:
let osLogStringSectionName = "__TEXT,__logstrings"
The initializer of osLogStringSectionName must be a string literal.