@@ -3,7 +3,6 @@ import { InitializedParams } from 'vscode-languageserver-protocol';
33import { LspCapabilities } from '../protocol/LspCapabilities' ;
44import { LspConnection } from '../protocol/LspConnection' ;
55import { ExtendedInitializeParams } from '../server/InitParams' ;
6- import { LoggerFactory } from '../telemetry/LoggerFactory' ;
76import { ExtensionName } from '../utils/ExtensionConfig' ;
87import { staticInitialize } from './initialize' ;
98
@@ -24,16 +23,16 @@ async function onInitialize(params: ExtendedInitializeParams) {
2423
2524function onInitialized ( params : InitializedParams ) {
2625 ( server as any ) . initialized ( params ) ;
27- getLogger ( ) . info ( `${ ExtensionName } initialized` ) ;
26+ console . error ( `${ ExtensionName } initialized` ) ;
2827}
2928
3029function onShutdown ( ) {
31- console . info ( `${ ExtensionName } shutting down...` ) ;
30+ console . error ( `${ ExtensionName } shutting down...` ) ;
3231 return ( server as any ) . close ( ) ;
3332}
3433
3534function onExit ( ) {
36- console . info ( `${ ExtensionName } exiting` ) ;
35+ console . error ( `${ ExtensionName } exiting` ) ;
3736}
3837
3938const lsp = new LspConnection ( createConnection ( ProposedFeatures . all ) , {
@@ -46,23 +45,8 @@ lsp.listen();
4645
4746process . on ( 'unhandledRejection' , ( reason , _promise ) => {
4847 console . error ( reason , 'Unhandled promise rejection' ) ;
49-
50- try {
51- getLogger ( ) . error ( reason , 'Unhandled promise rejection' ) ;
52- } catch {
53- // do nothing
54- }
5548} ) ;
5649
5750process . on ( 'uncaughtException' , ( error , origin ) => {
5851 console . error ( error , `Unhandled exception ${ origin } ` ) ;
59- try {
60- getLogger ( ) . error ( error , `Uncaught exception ${ origin } ` ) ;
61- } catch {
62- // do nothing
63- }
6452} ) ;
65-
66- function getLogger ( ) {
67- return LoggerFactory . getLogger ( 'Init' ) ;
68- }
0 commit comments