Skip to content

Commit 131c811

Browse files
add logging to SwiftLanguageService.doccDocumentation(_:)
1 parent 1c65bda commit 131c811

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Sources/SourceKitLSP/Swift/DoccDocumentation.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import DocCDocumentation
1616
import Foundation
1717
package import LanguageServerProtocol
1818
import SemanticIndex
19+
import SKLogging
1920
import SwiftExtensions
2021
import SwiftSyntax
2122

@@ -67,12 +68,14 @@ extension SwiftLanguageService {
6768
throw ResponseError.internalError("Unable to retrieve symbol graph for the document")
6869
}
6970
// Locate the documentation extension and include it in the request if one exists
70-
let markupExtensionFile = try? await findMarkupExtensionFile(
71-
workspace: workspace,
72-
documentationManager: documentationManager,
73-
catalogURL: catalogURL,
74-
for: symbolUSR
75-
)
71+
let markupExtensionFile = await orLog("Finding markup extension file for symbol \(symbolUSR)") {
72+
try await findMarkupExtensionFile(
73+
workspace: workspace,
74+
documentationManager: documentationManager,
75+
catalogURL: catalogURL,
76+
for: symbolUSR
77+
)
78+
}
7679
return try await documentationManager.renderDocCDocumentation(
7780
symbolUSR: symbolUSR,
7881
symbolGraph: symbolGraph,

0 commit comments

Comments
 (0)