Skip to content

Commit 187716f

Browse files
authored
Merge pull request #4 from owenv/owenv/log-spi
CustomLogStringConvertible should be SourceKit-LSP SPI
2 parents 5f0a597 + a9e2490 commit 187716f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/LanguageServerProtocolTransport/DocumentURI+CustomLogStringConvertible.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ extension DocumentURI {
2121
return "<DocumentURI length=\(description.count) hash=\(description.hashForLogging)>"
2222
}
2323
}
24-
extension DocumentURI: SKLogging.CustomLogStringConvertible {}
24+
@_spi(SourceKitLSP) extension DocumentURI: SKLogging.CustomLogStringConvertible {}

Sources/SKLogging/CustomLogStringConvertible.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public import Foundation
1414

1515
/// An object that can printed for logging and also offers a redacted description
1616
/// when logging in contexts in which private information shouldn't be captured.
17-
public protocol CustomLogStringConvertible: CustomStringConvertible, Sendable {
17+
@_spi(SourceKitLSP) public protocol CustomLogStringConvertible: CustomStringConvertible, Sendable {
1818
/// A full description of the object.
1919
var description: String { get }
2020

@@ -86,7 +86,7 @@ private struct OptionalWrapper<Wrapped>: CustomLogStringConvertible where Wrappe
8686
}
8787
}
8888

89-
extension Optional where Wrapped: CustomLogStringConvertible {
89+
@_spi(SourceKitLSP) extension Optional where Wrapped: CustomLogStringConvertible {
9090
@_spi(SourceKitLSP) public var forLogging: CustomLogStringConvertibleWrapper {
9191
return CustomLogStringConvertibleWrapper(OptionalWrapper(optional: self))
9292
}

0 commit comments

Comments
 (0)