title: How to monitor Application Event Logs in Azure App Service?
body: <p>We'd like to monitor the Application Event Logs (the Event Viewer - Application Log in a traditional Windows machine) in Azure App Service. The reason is if our app throws an unhandled exception and crashes during the host start up, IIS log the error message in the Application Event Logs, and we want to monitor this error and get an alert when it happens. Our ASP.NET host handles internal background jobs and there's no public endpoint.</p>
  <p>I checked <a href="https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs#send-logs-to-azure-monitor-preview" rel="nofollow noreferrer">Send Logs to Azure Monitor</a>, but it doesn't do Windows Event Log. Is there other way to monitor the ASP.NET host crash?</p>
  <p>One workaround is that App Service has &quot;Total App Domains&quot; metrics. If the host crashes, the app domain count will be 0. But I'm wondering there should be a way to monitor &quot;ASP.NET host crash&quot;?</p>