@@ -20,20 +20,21 @@ export type SharedProcessEvent = {
2020} | {
2121 readonly state : SharedProcessState . Stopped ;
2222 readonly error : string ;
23- }
23+ } ;
2424
2525export class SharedProcess {
26+
2627 public readonly socketPath : string = path . join ( os . tmpdir ( ) , `.vscode-online${ Math . random ( ) . toString ( ) } ` ) ;
2728 private _state : SharedProcessState = SharedProcessState . Stopped ;
2829 private activeProcess : ChildProcess | undefined ;
2930 private ipcHandler : StdioIpcHandler | undefined ;
3031 private readonly onStateEmitter : Emitter < SharedProcessEvent > ;
32+ private readonly logger = logger . named ( "SHDR PROC" ) ;
3133
3234 public constructor (
3335 private readonly userDataDir : string ,
3436 ) {
3537 this . onStateEmitter = new Emitter ( ) ;
36-
3738 this . restart ( ) ;
3839 }
3940
@@ -100,7 +101,11 @@ export class SharedProcess {
100101 state : SharedProcessState . Ready ,
101102 } ) ;
102103 } ) ;
104+ this . activeProcess . stdout . on ( "data" , ( data ) => {
105+ this . logger . debug ( "stdout" , field ( "message" , data . toString ( ) ) ) ;
106+ } ) ;
103107 this . activeProcess . stderr . on ( "data" , ( data ) => {
108+ this . logger . debug ( "stderr" , field ( "message" , data . toString ( ) ) ) ;
104109 if ( ! resolved ) {
105110 this . setState ( {
106111 error : data . toString ( ) ,
@@ -110,8 +115,6 @@ export class SharedProcess {
110115 return ;
111116 }
112117 this . activeProcess . kill ( ) ;
113- } else {
114- logger . named ( "SHRD PROC" ) . debug ( "stderr" , field ( "message" , data . toString ( ) ) ) ;
115118 }
116119 } ) ;
117120 }
0 commit comments