Skip to content

Commit a280ce3

Browse files
authored
Merge pull request #1042 from ahoppen/ahoppen/redacted-objc
Mark `redactedDescription` as `@objc`
2 parents c366163 + 9fbfa46 commit a280ce3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/LSPLogging/CustomLogStringConvertible.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public class CustomLogStringConvertibleWrapper: NSObject {
4141
return underlyingObject.description
4242
}
4343

44+
#if canImport(os)
45+
// When using OSLog mark redactedDescription as @objc so that OSLog can find it via the Objective-C runtime.
46+
// We can't unconditionally mark it as @objc because eg. Linux doesn't have the Objective-C runtime.
47+
@objc
48+
#endif
4449
public var redactedDescription: String {
4550
underlyingObject.redactedDescription
4651
}

0 commit comments

Comments
 (0)