@@ -67,25 +67,26 @@ export class NeovimClient extends Neovim {
67
67
resp : any ,
68
68
...restArgs : any [ ]
69
69
) {
70
- this . logger . info ( 'handleRequest: ' , method ) ;
71
70
// If neovim API is not generated yet and we are not handle a 'specs' request
72
71
// then queue up requests
73
72
//
74
73
// Otherwise emit as normal
75
74
if ( ! this . isApiReady && method !== 'specs' ) {
75
+ this . logger . info ( 'handleRequest (queued): %s' , method ) ;
76
76
this . requestQueue . push ( {
77
77
type : 'request' ,
78
78
args : [ method , args , resp , ...restArgs ] ,
79
79
} ) ;
80
80
} else {
81
+ this . logger . info ( 'handleRequest: %s' , method ) ;
81
82
this . emit ( 'request' , method , args , resp ) ;
82
83
}
83
84
}
84
85
85
86
emitNotification ( method : string , args : any [ ] ) {
86
87
if ( method . endsWith ( '_event' ) ) {
87
88
if ( ! method . startsWith ( 'nvim_buf_' ) ) {
88
- this . logger . error ( 'Unhandled event: ' , method ) ;
89
+ this . logger . error ( 'Unhandled event: %s ' , method ) ;
89
90
return ;
90
91
}
91
92
const shortName = method . replace ( REGEX_BUF_EVENT , '$1' ) ;
@@ -112,7 +113,7 @@ export class NeovimClient extends Neovim {
112
113
}
113
114
114
115
handleNotification ( method : string , args : VimValue [ ] , ...restArgs : any [ ] ) {
115
- this . logger . info ( 'handleNotification: ' , method ) ;
116
+ this . logger . info ( 'handleNotification: %s ' , method ) ;
116
117
// If neovim API is not generated yet then queue up requests
117
118
//
118
119
// Otherwise emit as normal
@@ -198,9 +199,13 @@ export class NeovimClient extends Neovim {
198
199
199
200
return true ;
200
201
} catch ( err ) {
201
- this . logger . error ( `Could not dynamically generate neovim API: ${ err } ` , {
202
- error : err ,
203
- } ) ;
202
+ this . logger . error (
203
+ `Could not dynamically generate neovim API: %s: %O` ,
204
+ err . name ,
205
+ {
206
+ error : err ,
207
+ }
208
+ ) ;
204
209
this . logger . error ( err . stack ) ;
205
210
return null ;
206
211
}
0 commit comments