Skip to content

Commit 12c225c

Browse files
authored
Merge pull request #1936 from ahoppen/flush-nondarwin-logger-shutdown
Flush the `NonDarwinLogger` before shutting down `SourceKitLSPServer`
2 parents 3ad1ddd + f7ab6c5 commit 12c225c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/SourceKitLSP/SourceKitLSPServer.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,8 @@ extension SourceKitLSPServer {
11811181
await workspace.buildSystemManager.setMainFilesProvider(nil)
11821182
workspace.closeIndex()
11831183
}
1184+
// Make sure we emit all pending log messages. When we're not using `NonDarwinLogger` this is a no-op.
1185+
await NonDarwinLogger.flush()
11841186
}
11851187

11861188
func shutdown(_ request: ShutdownRequest) async throws -> ShutdownRequest.Response {

0 commit comments

Comments
 (0)