App Service Logging
Overview
The following categories of App Service Logs are available to export to Storage Account or EventHub.
- HTTP logs
- App Service Console Logs
- App Service Application Logs
- Access Audit Logs
- IPSecurity Audit logs
- App Service Platform logs
Although, the application logs could be sent directly in the Application Level using a Opentelemetry Log Appender, this might not be an ideal solution for legacy software or micro-services model. It’s easier to do centralised logging for both application logs, system logs and SIEM Audit logs.
Prerequisites
Setup
- Navigate to your App Service in the Azure portal
- Go to the "Diagnostic settings" section
- Click on "Add Diagnostic Setting"
App Service Diagnostic Settings - Select the desired log categories to export:
- HTTP logs
- App Service Console Logs
- App Service Application Logs
- Access Audit Logs
- IPSecurity Audit logs
- App Service Platform logs
App Service Diagnostic Configuration
- Configure the destination as the Event Hub namespace and Event Hub name created earlier
- Save the diagnostic settings
That's it! You have successfully set up logging for your Azure App Service.