@@ -32,14 +32,14 @@ public string Identifier
3232 get { return _identifier ; }
3333 }
3434
35- public Coverage ( string module ,
36- string [ ] includeFilters ,
37- string [ ] includeDirectories ,
38- string [ ] excludeFilters ,
39- string [ ] excludedSourceFiles ,
40- string [ ] excludeAttributes ,
41- bool singleHit ,
42- string mergeWith ,
35+ public Coverage ( string module ,
36+ string [ ] includeFilters ,
37+ string [ ] includeDirectories ,
38+ string [ ] excludeFilters ,
39+ string [ ] excludedSourceFiles ,
40+ string [ ] excludeAttributes ,
41+ bool singleHit ,
42+ string mergeWith ,
4343 bool useSourceLink ,
4444 ILogger logger )
4545 {
@@ -62,14 +62,21 @@ public void PrepareModules()
6262 {
6363 string [ ] modules = InstrumentationHelper . GetCoverableModules ( _module , _includeDirectories ) ;
6464 string [ ] excludes = InstrumentationHelper . GetExcludedFiles ( _excludedSourceFiles ) ;
65+
66+ Array . ForEach ( _excludeFilters ?? Array . Empty < string > ( ) , filter => _logger . LogInformation ( $ "Exclude filter '{ filter } '") ) ;
67+ Array . ForEach ( _includeFilters ?? Array . Empty < string > ( ) , filter => _logger . LogInformation ( $ "Include filter '{ filter } '") ) ;
68+
6569 _excludeFilters = _excludeFilters ? . Where ( f => InstrumentationHelper . IsValidFilterExpression ( f ) ) . ToArray ( ) ;
6670 _includeFilters = _includeFilters ? . Where ( f => InstrumentationHelper . IsValidFilterExpression ( f ) ) . ToArray ( ) ;
6771
6872 foreach ( var module in modules )
6973 {
7074 if ( InstrumentationHelper . IsModuleExcluded ( module , _excludeFilters ) ||
7175 ! InstrumentationHelper . IsModuleIncluded ( module , _includeFilters ) )
76+ {
77+ _logger . LogInformation ( $ "Excluded module: '{ module } '") ;
7278 continue ;
79+ }
7380
7481 var instrumenter = new Instrumenter ( module , _identifier , _excludeFilters , _includeFilters , excludes , _excludeAttributes , _singleHit ) ;
7582 if ( instrumenter . CanInstrument ( ) )
@@ -81,6 +88,7 @@ public void PrepareModules()
8188 {
8289 var result = instrumenter . Instrument ( ) ;
8390 _results . Add ( result ) ;
91+ _logger . LogInformation ( $ "Instrumented module: '{ module } '") ;
8492 }
8593 catch ( Exception ex )
8694 {
@@ -197,7 +205,7 @@ private void CalculateCoverage()
197205 {
198206 if ( ! File . Exists ( result . HitsFilePath ) )
199207 {
200- // File not instrumented, or nothing in it called. Warn about this?
208+ _logger . LogWarning ( $ "Hits file:' { result . HitsFilePath } ' not found for module: ' { result . Module } '" ) ;
201209 continue ;
202210 }
203211
0 commit comments