File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -234,12 +234,6 @@ namespace ts.server {
234234 }
235235 }
236236
237- // E.g. "12:34:56.789"
238- function nowString ( ) {
239- const d = new Date ( ) ;
240- return `${ d . getHours ( ) } :${ d . getMinutes ( ) } :${ d . getSeconds ( ) } .${ d . getMilliseconds ( ) } ` ;
241- }
242-
243237 interface QueuedOperation {
244238 operationId : string ;
245239 operation : ( ) => void ;
Original file line number Diff line number Diff line change @@ -33,4 +33,11 @@ namespace ts.server {
3333 ? sys . args [ index + 1 ]
3434 : undefined ;
3535 }
36- }
36+
37+ /*@internal */
38+ export function nowString ( ) {
39+ // E.g. "12:34:56.789"
40+ const d = new Date ( ) ;
41+ return `${ d . getHours ( ) } :${ d . getMinutes ( ) } :${ d . getSeconds ( ) } .${ d . getMilliseconds ( ) } ` ;
42+ }
43+ }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ namespace ts.server.typingsInstaller {
2121 }
2222 writeLine = ( text : string ) => {
2323 try {
24- fs . appendFileSync ( this . logFile , text + sys . newLine ) ;
24+ fs . appendFileSync ( this . logFile , `[ ${ nowString ( ) } ] ${ text } ${ sys . newLine } ` ) ;
2525 }
2626 catch ( e ) {
2727 this . logEnabled = false ;
You can’t perform that action at this time.
0 commit comments