@@ -1037,7 +1037,8 @@ namespace ts.server {
1037
1037
}
1038
1038
1039
1039
private removeProject ( project : Project ) {
1040
- this . logger . info ( `remove project: ${ project . projectName } \nFiles::${ project . getRootFiles ( ) . toString ( ) } ` ) ;
1040
+ this . logger . info ( "`remove Project::" ) ;
1041
+ project . print ( ) ;
1041
1042
1042
1043
project . close ( ) ;
1043
1044
if ( Debug . shouldAssert ( AssertionLevel . Normal ) ) {
@@ -1477,19 +1478,9 @@ namespace ts.server {
1477
1478
1478
1479
const writeProjectFileNames = this . logger . hasLevel ( LogLevel . verbose ) ;
1479
1480
this . logger . startGroup ( ) ;
1480
- let counter = 0 ;
1481
- const printProjects = ( projects : Project [ ] , counter : number ) : number => {
1482
- for ( const project of projects ) {
1483
- this . logger . info ( `Project '${ project . getProjectName ( ) } ' (${ ProjectKind [ project . projectKind ] } ) ${ counter } ` ) ;
1484
- this . logger . info ( project . filesToString ( writeProjectFileNames ) ) ;
1485
- this . logger . info ( "-----------------------------------------------" ) ;
1486
- counter ++ ;
1487
- }
1488
- return counter ;
1489
- } ;
1490
- counter = printProjects ( this . externalProjects , counter ) ;
1491
- counter = printProjects ( arrayFrom ( this . configuredProjects . values ( ) ) , counter ) ;
1492
- printProjects ( this . inferredProjects , counter ) ;
1481
+ let counter = printProjectsWithCounter ( this . externalProjects , 0 ) ;
1482
+ counter = printProjectsWithCounter ( arrayFrom ( this . configuredProjects . values ( ) ) , counter ) ;
1483
+ printProjectsWithCounter ( this . inferredProjects , counter ) ;
1493
1484
1494
1485
this . logger . info ( "Open files: " ) ;
1495
1486
this . openFiles . forEach ( ( projectRootPath , path ) => {
@@ -2909,4 +2900,12 @@ namespace ts.server {
2909
2900
export function isConfigFile ( config : ScriptInfoOrConfig ) : config is TsConfigSourceFile {
2910
2901
return ( config as TsConfigSourceFile ) . kind !== undefined ;
2911
2902
}
2903
+
2904
+ function printProjectsWithCounter ( projects : Project [ ] , counter : number ) {
2905
+ for ( const project of projects ) {
2906
+ project . print ( counter ) ;
2907
+ counter ++ ;
2908
+ }
2909
+ return counter ;
2910
+ }
2912
2911
}
0 commit comments