Skip to content

Commit 0499449

Browse files
committed
Add a commented code to drop the pub. prefix for public metadata
I finally decided not to do this, but if we want to do it after all later, the code is there…
1 parent 69fca5e commit 0499449

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/OSLogLogger.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ private extension OSLogLogger {
206206
var pubMeta = [String]()
207207
var privMeta = [String]()
208208
metadata.lazy.sorted{ $0.key < $1.key }.forEach{ keyVal in
209+
/* If we wanted to drop the “pub.” prefix for public metadata. */
210+
// let isPub = keyVal.key.hasPrefix(Self.pubMetaPrefix)
211+
// let key = (isPub ? String(keyVal.key.dropFirst(Self.pubMetaPrefix.count)) : keyVal.key)
212+
// let flat = prettyMetadataKeyValPair((key, keyVal.value))
209213
let flat = prettyMetadataKeyValPair(keyVal)
210214
if keyVal.key.starts(with: Self.pubMetaPrefix) { pubMeta.append(flat)}
211215
else {privMeta.append(flat)}

0 commit comments

Comments
 (0)