From af538e495ef6d22562220f220d7c592babb2bbab Mon Sep 17 00:00:00 2001 From: Sean Feldman Date: Thu, 18 Apr 2019 01:01:47 -0600 Subject: [PATCH] log exception along with sending to AppInsights --- AppInsightsWithWebJob/ContinuousJob.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/AppInsightsWithWebJob/ContinuousJob.cs b/AppInsightsWithWebJob/ContinuousJob.cs index 74398ce..64fc181 100644 --- a/AppInsightsWithWebJob/ContinuousJob.cs +++ b/AppInsightsWithWebJob/ContinuousJob.cs @@ -38,6 +38,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) } catch (Exception exception) { + logger.LogCritical(exception, "Continuous job threw an exceptions."); telemetryClient.TrackException(exception); } }