diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs index 0668912fdd..8fd338b744 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs @@ -54,7 +54,7 @@ public ProcDumpDumper(IProcessHelper processHelper, IFileHelper fileHelper, IEnv // Console.ForegroundColor = ConsoleColor.White; // Log all standard output message of procdump in diag files. // Otherwise they end up coming on console in pipleine. - EqtTrace.Info("ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: " + data); + EqtTrace.Info($"ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: {data ?? ""}"); /// public void WaitForDumpToFinish() diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs index 1bf3db367a..aa52d7ac75 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs @@ -39,10 +39,10 @@ public ProcessDumpUtility(IProcessHelper processHelper, IFileHelper fileHelper, _crashDumperFactory = crashDumperFactory; } - protected Action OutputReceivedCallback => (process, data) => + protected Action OutputReceivedCallback => (process, data) => // Log all standard output message of procdump in diag files. // Otherwise they end up coming on console in pipleine. - EqtTrace.Info("ProcessDumpUtility.OutputReceivedCallback: Output received from procdump process: " + data); + EqtTrace.Info($"ProcessDumpUtility.OutputReceivedCallback: Output received from procdump process: {data ?? ""}"); /// public IEnumerable GetDumpFiles(bool warnOnNoDumpFiles, bool processCrashed) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/WindowsHangDumper.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/WindowsHangDumper.cs index 9af2d56146..881382c367 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/WindowsHangDumper.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/WindowsHangDumper.cs @@ -33,7 +33,7 @@ public WindowsHangDumper(IProcessHelper processHelper, Action? logWarnin // Console.ForegroundColor = ConsoleColor.White; // Log all standard output message of procdump in diag files. // Otherwise they end up coming on console in pipleine. - EqtTrace.Info("ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: " + data); + EqtTrace.Info($"ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: {data ?? ""}"); public void Dump(int processId, string outputDirectory, DumpTypeOption type) {