Skip to content

Commit 903f61b

Browse files
Move log to verbose for automatic excluded instrumented libs (#548)
Move log to verbose for automatic excluded instrumented libs
1 parent 41511a4 commit 903f61b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/coverlet.core/Instrumentation/Instrumenter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public bool CanInstrument()
7676
}
7777
else
7878
{
79-
_logger.LogWarning($"Unable to instrument module: {_module}, embedded pdb without local source files, [{firstNotFoundDocument}]");
79+
_logger.LogVerbose($"Unable to instrument module: {_module}, embedded pdb without local source files, [{firstNotFoundDocument}]");
8080
return false;
8181
}
8282
}
@@ -88,7 +88,7 @@ public bool CanInstrument()
8888
}
8989
else
9090
{
91-
_logger.LogWarning($"Unable to instrument module: {_module}, pdb without local source files, [{firstNotFoundDocument}]");
91+
_logger.LogVerbose($"Unable to instrument module: {_module}, pdb without local source files, [{firstNotFoundDocument}]");
9292
return false;
9393
}
9494
}

test/coverlet.core.tests/Instrumentation/InstrumenterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public void SkipEmbeddedPpdbWithoutLocalSource()
353353
Assert.True(_instrumentationHelper.HasPdb(xunitDll, out bool embedded));
354354
Assert.True(embedded);
355355
Assert.False(instrumenter.CanInstrument());
356-
loggerMock.Verify(l => l.LogWarning(It.IsAny<string>()));
356+
loggerMock.Verify(l => l.LogVerbose(It.IsAny<string>()));
357357

358358
// Default case
359359
string coverletCoreDll = Directory.GetFiles(Directory.GetCurrentDirectory(), "coverlet.core.dll").First();
@@ -380,7 +380,7 @@ public void SkipPpdbWithoutLocalSource()
380380
Assert.True(_instrumentationHelper.HasPdb(coverletLib, out bool embedded));
381381
Assert.False(embedded);
382382
Assert.False(instrumenter.CanInstrument());
383-
loggerMock.Verify(l => l.LogWarning(It.IsAny<string>()));
383+
loggerMock.Verify(l => l.LogVerbose(It.IsAny<string>()));
384384
}
385385

386386
[Fact]

0 commit comments

Comments
 (0)