2 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
T. R. Bernstein
e957caf031 Fix indention error in SPI config 2026-03-02 16:06:21 +01:00
T. R. Bernstein
48fdc144c1 Fix message reduction error
The unified logging system (aka OSLog) expects a OSLogMessage and does
not allow just passing in a string variable. Instead the variable has to
be interpolated into a string literal, which sets the default privacy
setting to 'private' and hence reducts the whole message.
This commit sets the privacy setting to 'public'.
2026-03-02 16:06:13 +01:00
3 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [LoggingOSLog]
- documentation_targets: [LoggingOSLog]

View File

@@ -78,6 +78,11 @@ library maps a reverse domain style label to the subsystem and category
parameters of the unified logging system. See
``/LoggingOSLog/LoggingOSLog/init(label:)`` for more information.
### What this library does not supply
This library does not implement any of the interpolation privacy features of
the unified logging system, i.e. there is no way to redact or align a meta
information, like the `Logging` API would allow.
[subsystem]: https://developer.apple.com/documentation/os/generating-log-messages-from-your-code#:~:text=The%20subsystem%20string,for%20each%20subsystem%20string.
[category]: https://developer.apple.com/documentation/os/generating-log-messages-from-your-code#:~:text=The%20category%20string,for%20these%20strings.

View File

@@ -82,7 +82,7 @@ public struct LoggingOSLog: LogHandler {
let messageParts = [message.description, metadataCSV]
let message = messageParts.compactMap { $0 }.joined(separator: " -> ")
self.oslogger.log(level: OSLogType.from(loggerLevel: level), "\(message)")
self.oslogger.log(level: OSLogType.from(loggerLevel: level), "\(message, privacy: .public)")
}
/**