File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ require (
9
9
github.com/pkg/errors v0.9.1
10
10
github.com/stretchr/testify v1.7.0
11
11
go.bug.st/json v1.15.6
12
- go.bug.st/lsp v0.0.0-20211202163946-3ad3994172a0
12
+ go.bug.st/lsp v0.0.0-20220608135618-8a2f8eb9ad1b
13
13
google.golang.org/grpc v1.42.0
14
14
)
Original file line number Diff line number Diff line change @@ -337,10 +337,8 @@ go.bug.st/downloader/v2 v2.1.1 h1:nyqbUizo3E2IxCCm4YFac4FtSqqFpqWP+Aae5GCMuw4=
337
337
go.bug.st/downloader/v2 v2.1.1 /go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13RzVII =
338
338
go.bug.st/json v1.15.6 h1:pvSpotu6f5JoCbx1TnKn6asVH7o9Tg2/GKsZSVzBOsc =
339
339
go.bug.st/json v1.15.6 /go.mod h1:bh58F9adz5ePlNqtvbuXuXcf9k6IrDLKH6lJUsHP3TI =
340
- go.bug.st/lsp v0.0.0-20211130152916-c597b0a0439f h1:Rj7FdBdROWh9mMra/16G/5d7u/QE0Wwq487NZt+Evjg =
341
- go.bug.st/lsp v0.0.0-20211130152916-c597b0a0439f /go.mod h1:oYTh1uf5hI1teV5crrWut41Pk8vD/NqIjs4zD+No5FE =
342
- go.bug.st/lsp v0.0.0-20211202163946-3ad3994172a0 h1:/SnZ7aZ3bmfUKWbhckiK6L4mv9vyf9HgwV6X0dm+/is =
343
- go.bug.st/lsp v0.0.0-20211202163946-3ad3994172a0 /go.mod h1:oYTh1uf5hI1teV5crrWut41Pk8vD/NqIjs4zD+No5FE =
340
+ go.bug.st/lsp v0.0.0-20220608135618-8a2f8eb9ad1b h1:JkRunYlYDXFIgMf3BfgFrQyvHCsqkUuCGL9CUYhY3zc =
341
+ go.bug.st/lsp v0.0.0-20220608135618-8a2f8eb9ad1b /go.mod h1:oYTh1uf5hI1teV5crrWut41Pk8vD/NqIjs4zD+No5FE =
344
342
go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18 h1:F1qxtaFuewctYc/SsHRn+Q7Dtwi+yJGPgVq8YLtQz98 =
345
343
go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18 /go.mod h1:Cx1VqMtEhE9pIkEyUj3LVVVPkv89dgW8aCKrRPDR/uE =
346
344
go.bug.st/serial v1.3.2 /go.mod h1:jDkjqASf/qSjmaOxHSHljwUQ6eHo/ZX/bxJLQqSlvZg =
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package ls
3
3
import (
4
4
"fmt"
5
5
"log"
6
+ "time"
6
7
7
8
"github.com/fatih/color"
8
9
"go.bug.st/json"
@@ -15,6 +16,10 @@ type LSPLogger struct {
15
16
ErrorColor func (format string , a ... interface {}) string
16
17
}
17
18
19
+ func init () {
20
+ log .SetFlags (log .Lmicroseconds )
21
+ }
22
+
18
23
func (l * LSPLogger ) LogOutgoingRequest (id string , method string , params json.RawMessage ) {
19
24
log .Print (l .HiColor ("%s REQU %s %s" , l .OutgoingPrefix , method , id ))
20
25
}
@@ -58,6 +63,12 @@ func (l *LSPLogger) LogIncomingNotification(method string, params json.RawMessag
58
63
prefix : fmt .Sprintf ("%s %s" , spaces [:len (l .IncomingPrefix )], method ),
59
64
}
60
65
}
66
+ func (l * LSPLogger ) LogIncomingDataDelay (delay time.Duration ) {
67
+ log .Printf ("IN Elapsed: %v" , delay )
68
+ }
69
+ func (l * LSPLogger ) LogOutgoingDataDelay (delay time.Duration ) {
70
+ log .Printf ("OUT Elapsed: %v" , delay )
71
+ }
61
72
62
73
type LSPFunctionLogger struct {
63
74
colorFunc func (format string , a ... interface {}) string
You can’t perform that action at this time.
0 commit comments