Skip to content

Commit 0aac685

Browse files
authored
chore: Improve log messages for safe mode (#3352)
misc: improve log messages for safe mode
1 parent 347110c commit 0aac685

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Stryker.Core/Stryker.Core/Compiling/CSharpRollbackProcess.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,13 @@ private Collection<SyntaxNode> ScanForSuspiciousMutations(Diagnostic[] diagnosti
252252
// we have to remove every mutation
253253
var errorLocation = diagnostic.Location.GetMappedLineSpan();
254254
Logger.LogWarning(
255-
"Stryker.NET encountered a compile error in {Path} (at {Line}:{StartCharacter}) with id: {DiagnosticId}, message: {Message} (Source code: {BrokenMutation})",
256-
errorLocation.Path, errorLocation.StartLinePosition.Line, diagnostic.Id,
257-
errorLocation.StartLinePosition.Character, diagnostic.GetMessage(), brokenMutation);
255+
"An unidentified mutation in {Path} resulted in a compile error (at {Line}:{StartCharacter}) with id: {DiagnosticId}, message: {Message} (Source code: {BrokenMutation})",
256+
errorLocation.Path, errorLocation.StartLinePosition.Line,
257+
errorLocation.StartLinePosition.Character, diagnostic.Id,
258+
diagnostic.GetMessage(), brokenMutation);
258259

259260
Logger.LogInformation(
260-
"Safe Mode! Stryker will flag mutations in {DisplayName} as compile error.",
261+
"Safe Mode! Stryker will remove all mutations in {DisplayName} and mark them as 'compile error'.",
261262
DisplayName(initNode));
262263
// backup, remove all mutations in the node
263264
foreach (var mutant in scan.Where(mutant => !suspiciousMutations.Contains(mutant.Node)))

0 commit comments

Comments
 (0)