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

  1. Navigate to your App Service in the Azure portal
  2. Search for "Diagnostic settings" in the left navigation menu
  3. Click on "Add Diagnostic Setting"
    App Service Diagnostic Settings

    App Service Diagnostic Settings

  4. 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

    App Service Diagnostic Configuration

  5. Configure the destination details as "Stream to an Event Hub" and select the Event Hub namespace and Event Hub name created during the EventHub Setup
  6. Save the diagnostic settings

That's it! You have successfully set up logging for your Azure App Service.

Was this page helpful?