@@ -13,7 +13,7 @@ import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from 'vs/base/co
13
13
import { URI } from 'vs/base/common/uri' ;
14
14
import { Promises } from 'vs/base/node/pfs' ;
15
15
import { localize } from 'vs/nls' ;
16
- import { ILogService } from 'vs/platform/log/common/log' ;
16
+ import { ILogService , LogLevel } from 'vs/platform/log/common/log' ;
17
17
import { IProductService } from 'vs/platform/product/common/productService' ;
18
18
import { FlowControlConstants , IShellLaunchConfig , ITerminalChildProcess , ITerminalLaunchError , IProcessProperty , IProcessPropertyMap as IProcessPropertyMap , ProcessPropertyType , TerminalShellType , IProcessReadyEvent , ITerminalProcessOptions , PosixShellType , IProcessReadyWindowsPty } from 'vs/platform/terminal/common/terminal' ;
19
19
import { ChildProcessMonitor } from 'vs/platform/terminal/node/childProcessMonitor' ;
@@ -353,7 +353,9 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
353
353
// Allow any trailing data events to be sent before the exit event is sent.
354
354
// See https://github.com/Tyriar/node-pty/issues/72
355
355
private _queueProcessExit ( ) {
356
- this . _logService . trace ( 'TerminalProcess#_queueProcessExit' , new Error ( ) . stack ?. replace ( / ^ E r r o r / , '' ) ) ;
356
+ if ( this . _logService . getLevel ( ) === LogLevel . Trace ) {
357
+ this . _logService . trace ( 'TerminalProcess#_queueProcessExit' , new Error ( ) . stack ?. replace ( / ^ E r r o r / , '' ) ) ;
358
+ }
357
359
if ( this . _closeTimeout ) {
358
360
clearTimeout ( this . _closeTimeout ) ;
359
361
}
@@ -418,7 +420,9 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
418
420
}
419
421
420
422
shutdown ( immediate : boolean ) : void {
421
- this . _logService . trace ( 'TerminalProcess#shutdown' , new Error ( ) . stack ?. replace ( / ^ E r r o r / , '' ) ) ;
423
+ if ( this . _logService . getLevel ( ) === LogLevel . Trace ) {
424
+ this . _logService . trace ( 'TerminalProcess#shutdown' , new Error ( ) . stack ?. replace ( / ^ E r r o r / , '' ) ) ;
425
+ }
422
426
// don't force immediate disposal of the terminal processes on Windows as an additional
423
427
// mitigation for https://github.com/microsoft/vscode/issues/71966 which causes the pty host
424
428
// to become unresponsive, disconnecting all terminals across all windows.
0 commit comments