File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -644,14 +644,18 @@ namespace ts.server {
644644 const cmdLineVerbosity = getLogLevel ( findArgument ( "--logVerbosity" ) ) ;
645645 const envLogOptions = parseLoggingEnvironmentString ( process . env . TSS_LOG ) ;
646646
647- const logFileName = cmdLineLogFileName
647+ const unsubstitutedLogFileName = cmdLineLogFileName
648648 ? stripQuotes ( cmdLineLogFileName )
649649 : envLogOptions . logToFile
650650 ? envLogOptions . file || ( __dirname + "/.log" + process . pid . toString ( ) )
651651 : undefined ;
652652
653+ const substitutedLogFileName = unsubstitutedLogFileName
654+ ? unsubstitutedLogFileName . replace ( "PID" , process . pid . toString ( ) )
655+ : undefined ;
656+
653657 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
655659 }
656660 // This places log file in the directory containing editorServices.js
657661 // TODO: check that this location is writable
You can’t perform that action at this time.
0 commit comments