Browse Source

Don't log when pipe is broken (#333)

davidfowl/aspnet-urls
Justin Kotalik 7 years ago
committed by GitHub
parent
commit
40cecc6055
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs

16
src/Microsoft.Tye.Hosting.Diagnostics/DiagnosticsCollector.cs

@ -197,23 +197,9 @@ namespace Microsoft.Tye.Hosting.Diagnostics
{ {
session = client.StartEventPipeSession(providers); session = client.StartEventPipeSession(providers);
} }
catch (EndOfStreamException)
{
break;
}
// If the process has already exited, a ServerNotAvailableException will be thrown. // If the process has already exited, a ServerNotAvailableException will be thrown.
catch (ServerNotAvailableException) catch (Exception)
{
break;
}
catch (Exception ex)
{ {
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; break;
} }

Loading…
Cancel
Save