@@ -1041,7 +1041,8 @@ namespace ts.server {
1041
1041
}
1042
1042
1043
1043
private removeProject ( project : Project ) {
1044
- this . logger . info ( `remove project: ${ project . projectName } \nFiles::${ project . getRootFiles ( ) . toString ( ) } ` ) ;
1044
+ this . logger . info ( "`remove Project::" ) ;
1045
+ project . print ( ) ;
1045
1046
1046
1047
project . close ( ) ;
1047
1048
if ( Debug . shouldAssert ( AssertionLevel . Normal ) ) {
@@ -1487,19 +1488,9 @@ namespace ts.server {
1487
1488
1488
1489
const writeProjectFileNames = this . logger . hasLevel ( LogLevel . verbose ) ;
1489
1490
this . logger . startGroup ( ) ;
1490
- let counter = 0 ;
1491
- const printProjects = ( projects : Project [ ] , counter : number ) : number => {
1492
- for ( const project of projects ) {
1493
- this . logger . info ( `Project '${ project . getProjectName ( ) } ' (${ ProjectKind [ project . projectKind ] } ) ${ counter } ` ) ;
1494
- this . logger . info ( project . filesToString ( writeProjectFileNames ) ) ;
1495
- this . logger . info ( "-----------------------------------------------" ) ;
1496
- counter ++ ;
1497
- }
1498
- return counter ;
1499
- } ;
1500
- counter = printProjects ( this . externalProjects , counter ) ;
1501
- counter = printProjects ( arrayFrom ( this . configuredProjects . values ( ) ) , counter ) ;
1502
- printProjects ( this . inferredProjects , counter ) ;
1491
+ let counter = printProjectsWithCounter ( this . externalProjects , 0 ) ;
1492
+ counter = printProjectsWithCounter ( arrayFrom ( this . configuredProjects . values ( ) ) , counter ) ;
1493
+ printProjectsWithCounter ( this . inferredProjects , counter ) ;
1503
1494
1504
1495
this . logger . info ( "Open files: " ) ;
1505
1496
this . openFiles . forEach ( ( projectRootPath , path ) => {
@@ -2970,4 +2961,12 @@ namespace ts.server {
2970
2961
export function isConfigFile ( config : ScriptInfoOrConfig ) : config is TsConfigSourceFile {
2971
2962
return ( config as TsConfigSourceFile ) . kind !== undefined ;
2972
2963
}
2964
+
2965
+ function printProjectsWithCounter ( projects : Project [ ] , counter : number ) {
2966
+ for ( const project of projects ) {
2967
+ project . print ( counter ) ;
2968
+ counter ++ ;
2969
+ }
2970
+ return counter ;
2971
+ }
2973
2972
}
0 commit comments