Separate metadata by a unicode arrow in log
Use a single unicode right arrow instead of the two char ASCII right arrow to separate the metadata from the actual log message. This is just a preference decision and has no functional background.
This commit is contained in:
@@ -85,8 +85,8 @@ library maps a reverse domain style label to the subsystem and category
|
|||||||
parameters of the unified logging system. See
|
parameters of the unified logging system. See
|
||||||
``/LoggingOSLog/LoggingOSLog/init(label:)`` for more information.
|
``/LoggingOSLog/LoggingOSLog/init(label:)`` for more information.
|
||||||
|
|
||||||
Metadata is appended as JSON to the logged message after an ASCII right
|
Metadata is appended as JSON to the logged message after a simple unicode right
|
||||||
arrow ("->").
|
arrow ("→").
|
||||||
|
|
||||||
### What this library does not supply
|
### What this library does not supply
|
||||||
This library does not implement any of the interpolation privacy features of
|
This library does not implement any of the interpolation privacy features of
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public struct LoggingOSLog: LogHandler {
|
|||||||
let metadataCSV = Self.joinedMetadata(self.metadata, self.metadataProvider?.get(), metadata)
|
let metadataCSV = Self.joinedMetadata(self.metadata, self.metadataProvider?.get(), metadata)
|
||||||
let messageParts = [message.description, metadataCSV]
|
let messageParts = [message.description, metadataCSV]
|
||||||
|
|
||||||
let message = messageParts.compactMap { $0 }.joined(separator: " -> ")
|
let message = messageParts.compactMap { $0 }.joined(separator: " → ")
|
||||||
self.oslogger.log(level: OSLogType.from(loggerLevel: level), "\(message, privacy: .public)")
|
self.oslogger.log(level: OSLogType.from(loggerLevel: level), "\(message, privacy: .public)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user