mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Log messages from the build server and clangd
Log messages sent to clangd and the build server in a similar way that we log requests to sourcekitd. Fixes #886 rdar://116705677
This commit is contained in:
@@ -191,6 +191,12 @@ public actor BuildServerBuildSystem: MessageHandler {
|
||||
///
|
||||
/// We need to notify the delegate about any updated build settings.
|
||||
public nonisolated func handle(_ params: some NotificationType, from clientID: ObjectIdentifier) {
|
||||
logger.info(
|
||||
"""
|
||||
Received notification from build server:
|
||||
\(params.forLogging)
|
||||
"""
|
||||
)
|
||||
bspMessageHandlingQueue.async {
|
||||
if let params = params as? BuildTargetsChangedNotification {
|
||||
await self.handleBuildTargetsChanged(params)
|
||||
@@ -209,6 +215,12 @@ public actor BuildServerBuildSystem: MessageHandler {
|
||||
from clientID: ObjectIdentifier,
|
||||
reply: @escaping (LSPResult<R.Response>) -> Void
|
||||
) {
|
||||
logger.info(
|
||||
"""
|
||||
Received request from build server:
|
||||
\(params.forLogging)
|
||||
"""
|
||||
)
|
||||
reply(.failure(ResponseError.methodNotFound(R.method)))
|
||||
}
|
||||
|
||||
@@ -339,6 +351,7 @@ private func makeJSONRPCBuildServer(
|
||||
let serverToClient = Pipe()
|
||||
|
||||
let connection = JSONRPCConnection(
|
||||
name: "build server",
|
||||
protocol: BuildServerProtocol.bspRegistry,
|
||||
inFD: serverToClient.fileHandleForReading,
|
||||
outFD: clientToServer.fileHandleForWriting
|
||||
|
||||
Reference in New Issue
Block a user