File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,7 @@ export class ProcessWatcher {
9797 name : "jdtls-last-heartbeat" ,
9898 message : lastHeartbeat !
9999 } ) ;
100- const consentToCollectLogs = vscode . workspace . getConfiguration ( "java" ) . get < boolean > ( "help.shareDiagnostics" ) ;
101- if ( ! consentToCollectLogs ) {
102- vscode . window . showInformationMessage ( "Java Language Server is crashed. Do you want to share error logs with us for diagnostic purpose?" , "Yes" ) . then ( choice => {
103- if ( choice ) {
104- vscode . workspace . getConfiguration ( "java" ) . update ( "help.shareDiagnostics" , true ) ;
105- this . daemon . logWatcher . sendErrorAndStackOnCrash ( ) ;
106- }
107- } ) ;
108- }
100+ this . daemon . logWatcher . sendErrorAndStackOnCrash ( ) ;
109101 }
110102}
111103
Original file line number Diff line number Diff line change @@ -87,13 +87,17 @@ export class LogWatcher {
8787 if ( this . serverLogUri ) {
8888 const logs = await logsForLatestSession ( path . join ( this . serverLogUri ?. fsPath , ".log" ) ) ;
8989 const errors = collectErrors ( logs ) ;
90+ const consentToCollectLogs = vscode . workspace . getConfiguration ( "java" ) . get < boolean > ( "help.shareDiagnostics" ) ;
9091 if ( errors ) {
9192 errors . forEach ( e => {
92- sendInfo ( "" , {
93+ consentToCollectLogs ? sendInfo ( "" , {
9394 name : "jdtls-error-in-crashed-session" ,
9495 error : e . message ,
9596 stack : e . stack ! ,
9697 timestamp : e . timestamp ! . toString ( )
98+ } ) : sendInfo ( "" , {
99+ name : "jdtls-error-in-crashed-session" ,
100+ timestamp : e . timestamp ! . toString ( )
97101 } ) ;
98102 } )
99103 }
You can’t perform that action at this time.
0 commit comments