File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -644,14 +644,18 @@ namespace ts.server {
644
644
const cmdLineVerbosity = getLogLevel ( findArgument ( "--logVerbosity" ) ) ;
645
645
const envLogOptions = parseLoggingEnvironmentString ( process . env . TSS_LOG ) ;
646
646
647
- const logFileName = cmdLineLogFileName
647
+ const unsubstitutedLogFileName = cmdLineLogFileName
648
648
? stripQuotes ( cmdLineLogFileName )
649
649
: envLogOptions . logToFile
650
650
? envLogOptions . file || ( __dirname + "/.log" + process . pid . toString ( ) )
651
651
: undefined ;
652
652
653
+ const substitutedLogFileName = unsubstitutedLogFileName
654
+ ? unsubstitutedLogFileName . replace ( "PID" , process . pid . toString ( ) )
655
+ : undefined ;
656
+
653
657
const logVerbosity = cmdLineVerbosity || envLogOptions . detailLevel ;
654
- return new Logger ( logFileName ! , envLogOptions . traceToConsole ! , logVerbosity ! ) ; // TODO: GH#18217
658
+ return new Logger ( substitutedLogFileName ! , envLogOptions . traceToConsole ! , logVerbosity ! ) ; // TODO: GH#18217
655
659
}
656
660
// This places log file in the directory containing editorServices.js
657
661
// TODO: check that this location is writable
You can’t perform that action at this time.
0 commit comments