Skip to content

Commit 6818cbe

Browse files
committed
Log a few strings publicly
Just something I noticed while reading logs
1 parent 49d0338 commit 6818cbe

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Sources/LanguageServerProtocolExtensions/QueueBasedMessageHandler.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ extension QueueBasedMessageHandler {
192192
)
193193
.makeSignposter()
194194
let signpostID = signposter.makeSignpostID()
195-
let state = signposter.beginInterval("Notification", id: signpostID, "\(type(of: notification).method)")
195+
let state = signposter.beginInterval(
196+
"Notification",
197+
id: signpostID,
198+
"\(type(of: notification).method, privacy: .public)"
199+
)
196200
messageHandlingQueue.async(metadata: DependencyTracker(notification)) {
197201
signposter.emitEvent("Start handling", id: signpostID)
198202
await self.handle(notification: notification)
@@ -209,7 +213,7 @@ extension QueueBasedMessageHandler {
209213
let signposter = Logger(subsystem: LoggingScope.subsystem, category: messageHandlingHelper.signpostLoggingCategory)
210214
.makeSignposter()
211215
let signpostID = signposter.makeSignpostID()
212-
let state = signposter.beginInterval("Request", id: signpostID, "\(Request.method)")
216+
let state = signposter.beginInterval("Request", id: signpostID, "\(Request.method, privacy: .public)")
213217

214218
self.didReceive(request: request, id: id)
215219

Sources/SourceKitLSP/SourceKitLSPServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ extension SourceKitLSPServer: QueueBasedMessageHandler {
751751
}
752752
}
753753

754-
logger.log("Received request \(id): \(params.forLogging)")
754+
logger.log("Received request \(id, privacy: .public): \(params.forLogging)")
755755

756756
if let textDocumentRequest = params as? any TextDocumentRequest {
757757
await self.clientInteractedWithDocument(textDocumentRequest.textDocument.uri)

0 commit comments

Comments
 (0)