From b315fffd513b402b360d076099a48985d1eacfb4 Mon Sep 17 00:00:00 2001 From: Brandon Foss Date: Fri, 6 Aug 2021 15:37:28 -0700 Subject: [PATCH 1/2] Improves error code log message in watch mode --- src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs index b3e89dfe..fe6f1049 100644 --- a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs +++ b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Watcher { // Only show this error message if the process exited non-zero due to a normal process exit. // Don't show this if dotnet-watch killed the inner process due to file change or CTRL+C by the user - _logger.LogError($"watch: Exited with error code {processTask.Result}"); + _logger.LogError($"watch: Exited with exit code {processTask.Result.ExitCode}"); } else { @@ -109,7 +109,7 @@ namespace Microsoft.DotNet.Watcher if (exitCode == 0) { break; - // Build failed, keep retrying builds until successful build. + // Build failed, keep retrying builds until successful build. } await fileSetWatcher.GetChangedFileAsync(cancellationToken, () => _logger.LogWarning("Waiting for a file to change before restarting dotnet...")); From 497d98c75cf670cddba55590caad63ecdcdb6182 Mon Sep 17 00:00:00 2001 From: Brandon Foss Date: Mon, 9 Aug 2021 14:29:17 -0700 Subject: [PATCH 2/2] Updates logging format to include more information. --- src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs index fe6f1049..4cc8bcb4 100644 --- a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs +++ b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Watcher { // Only show this error message if the process exited non-zero due to a normal process exit. // Don't show this if dotnet-watch killed the inner process due to file change or CTRL+C by the user - _logger.LogError($"watch: Exited with exit code {processTask.Result.ExitCode}"); + _logger.LogError("watch: {Replica} process exited with exit code {ExitCode}", replica, processTask.Result.ExitCode); } else {