File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Sources/LanguageServerProtocolExtensions Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11
11
//===----------------------------------------------------------------------===//
12
12
13
13
import Dispatch
14
+ import Foundation
14
15
package import LanguageServerProtocol
15
16
import LanguageServerProtocolJSONRPC
16
17
import SKLogging
@@ -126,20 +127,23 @@ package final class LocalConnection: Connection, Sendable {
126
127
}
127
128
128
129
precondition ( self . state == . started)
130
+ let startDate = Date ( )
129
131
handler. handle ( request, id: id) { result in
130
132
switch result {
131
133
case . success( let response) :
132
134
logger. info (
133
135
"""
134
- Received reply for request \( id, privacy: . public) from \( self . name, privacy: . public)
136
+ Received reply for request \( id, privacy: . public) from \( self . name, privacy: . public) \
137
+ (took \( Date ( ) . timeIntervalSince ( startDate) * 1000 , privacy: . public) ms)
135
138
\( Request . method, privacy: . public)
136
139
\( response. forLogging)
137
140
"""
138
141
)
139
142
case . failure( let error) :
140
143
logger. error (
141
144
"""
142
- Received error for request \( id, privacy: . public) from \( self . name, privacy: . public)
145
+ Received error for request \( id, privacy: . public) from \( self . name, privacy: . public) \
146
+ (took \( Date ( ) . timeIntervalSince ( startDate) * 1000 , privacy: . public) ms)
143
147
\( Request . method, privacy: . public)
144
148
\( error. forLogging)
145
149
"""
You can’t perform that action at this time.
0 commit comments