mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Merge pull request #1941 from ahoppen/log-request-names
Log the request methods when logging a request's reply
This commit is contained in:
@@ -138,6 +138,7 @@ package final class LocalConnection: Connection, Sendable {
|
||||
logger.info(
|
||||
"""
|
||||
Received reply for request \(id, privacy: .public) from \(self.name, privacy: .public)
|
||||
\(Request.method, privacy: .public)
|
||||
\(response.forLogging)
|
||||
"""
|
||||
)
|
||||
@@ -145,6 +146,7 @@ package final class LocalConnection: Connection, Sendable {
|
||||
logger.error(
|
||||
"""
|
||||
Received error for request \(id, privacy: .public) from \(self.name, privacy: .public)
|
||||
\(Request.method, privacy: .public)
|
||||
\(error.forLogging)
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -192,7 +192,7 @@ extension QueueBasedMessageHandler {
|
||||
)
|
||||
.makeSignposter()
|
||||
let signpostID = signposter.makeSignpostID()
|
||||
let state = signposter.beginInterval("Notification", id: signpostID, "\(type(of: notification))")
|
||||
let state = signposter.beginInterval("Notification", id: signpostID, "\(type(of: notification).method)")
|
||||
messageHandlingQueue.async(metadata: DependencyTracker(notification)) {
|
||||
signposter.emitEvent("Start handling", id: signpostID)
|
||||
await self.handle(notification: notification)
|
||||
@@ -209,7 +209,7 @@ extension QueueBasedMessageHandler {
|
||||
let signposter = Logger(subsystem: LoggingScope.subsystem, category: messageHandlingHelper.signpostLoggingCategory)
|
||||
.makeSignposter()
|
||||
let signpostID = signposter.makeSignpostID()
|
||||
let state = signposter.beginInterval("Request", id: signpostID, "\(Request.self)")
|
||||
let state = signposter.beginInterval("Request", id: signpostID, "\(Request.method)")
|
||||
|
||||
self.didReceive(request: request, id: id)
|
||||
|
||||
|
||||
@@ -708,6 +708,7 @@ public final class JSONRPCConnection: Connection {
|
||||
logger.info(
|
||||
"""
|
||||
Received reply for request \(id, privacy: .public) from \(self.name, privacy: .public)
|
||||
\(Request.method, privacy: .public)
|
||||
\(response.forLogging)
|
||||
"""
|
||||
)
|
||||
@@ -715,6 +716,7 @@ public final class JSONRPCConnection: Connection {
|
||||
logger.error(
|
||||
"""
|
||||
Received error for request \(id, privacy: .public) from \(self.name, privacy: .public)
|
||||
\(Request.method, privacy: .public)
|
||||
\(error.forLogging)
|
||||
"""
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user