From 40cecc60556a811586becfe6a793ea0e925b465c Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 9 Apr 2020 10:55:19 -0700 Subject: [PATCH] Don't log when pipe is broken (#333) --- .../DiagnosticsCollector.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs b/src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs index f93e0311..2267daaf 100644 --- a/src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs +++ b/src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs @@ -197,23 +197,9 @@ namespace Microsoft.Tye.Hosting.Diagnostics { session = client.StartEventPipeSession(providers); } - catch (EndOfStreamException) - { - break; - } // If the process has already exited, a ServerNotAvailableException will be thrown. - catch (ServerNotAvailableException) - { - break; - } - catch (Exception ex) + catch (Exception) { - if (!cancellationToken.IsCancellationRequested) - { - _logger.LogDebug(0, ex, "Failed to start the event pipe session"); - } - - // We can't even start the session, wait until the process boots up again to start another metrics thread break; }