New Fresh deep-dives on cloud, AI, mobile & web now publish on blog.msdevbuild.com Read the latest → Install the app
Azure

Microsoft Azure: Configure Azure App Service Logging

By   Monday, May 24, 2021 comments
reads
React:
Azure App service logging are the output of runtime trace statement in the different app code. logging feature will help you might only want to see a logged message when a particular level of error has occurred, While developing a Web App or an API, this can be very useful in order to debug it.

Azure provides built-in diagnostics to assist with debugging an App service App. In this article, you will learn what are the different types of diagnostics logging and steps to enable in Azure Portal. I have shared in my previous article details information to create a web app using the Azure portal and use the same application for demo.
Enable diagnostics logging for apps in Azure App Service

Types of Azure App service Logging

Azure provides the below-logging feature in the new Azure portal and all the logging features will support the Windows platform and some of the logging will support Linux as well. Logs can be stored and located for accessing information in the portal.
  1. Application Logging (Filesystem and Blob)
  2. Web Server logging (Filesystem and Storage)
  3. Detailed Error Message
  4. Failed request tracing

Step to Enable Application logging

Application logs message generated by the application. There are two options available in application logging as Filesystem and Blob. Contains one or more text files. The format of the log messages depends on the logging provider and access logging in the following directory - /Logfile/Application/

Filesystem

The Filesystem option is for temporary debugging purposes and turns itself off in 12 hours.

Blob

The Blob option is for long-term logging and needs a blob storage container to write logs to.

Error Level

Application error detail fall into the following error level
  1. Error – Included category by Error and Critical
  2. Warning - Included category by Warning, Error, and Critical
  3. Information - Included category by Info, Warning, Error, and Critical
  4. Verbose - Trace, Debug, Info, Warning, Error, Critical (all categories)
You can follow the below steps to enable application logging for Windows apps in the Azure portal.

Step 1: Navigate to the Azure portal and select your Web app and select App Service logs.
Enable diagnostics logging for apps in Azure App Service

Step 2: Select on either Application logging Filesystem or Blob or both, in this demo I have enabled Application logging as a File system.
Step 3: You can also set the Error level as Error, warning, information, verbose.
Step 4: Select Save Options.

Step to Enable Web Server logging

Web Server Logging also having two different types of storage and File Systems, Raw HTTP request data in the W3C extended log file format. Each log message includes data such as the HTTP method, resource URI, client IP, client port, user agent, response code, and store log file in the /LogFiles/http/RawLogs/. You can follow the below steps to enable webserver logging

Step 1: Navigate to the Azure portal and select your Web app and select App Service logs.

Enable diagnostics logging for apps in Azure App Service

Step 2: Select on either Web server logging Filesystem or Blob, in this demo I have enabled server logging as a File system.
Step 3: Provide Quota and Retention Period (Days), set the number of days the logs should be retained.
Step 4: Once all the details filled and click on save options

Detailed Error Message

Detail Error Message selects as ON, they will generate an error message as a File system and Copies of the .htm error pages that would have been sent to the client browser. For security reasons, detailed error pages shouldn't be sent to clients in production, but App Service can save the error page each time an application error occurs that has HTTP code 400 or greater and file will store in the directory is http://logfiles/DetailedErrors/

Enable diagnostics logging for apps in Azure App Service

Failed request tracing

The Failed request tracing including a trace of the IIS components used to process the request and the time taken in each component. It's useful if you want to improve site performance or isolate a specific HTTP error. The file format is XML files and an XSL file. You can view the formatted XML files in the browser and a file store directory is /LogFiles/W3SVC#########/

Enable diagnostics logging for apps in Azure App Service

Download Log File

All the different logging has Specify logs stored in the App Service file system, the easiest way is to download the ZIP file in the browser at

Windows apps: https://<app-name>.scm.azurewebsites.net/api/dump

Linux/container apps: https://<app-name>.scm.azurewebsites.net/api/logs/docker/zip


Summary

In this article, you have learned detail about the Azure logging feature and how to enable different logging uses the Azure portal, Will share in the next article about implementing logging and send log messages to the application logs. If you have any questions/feedback/ issues, please write them in the comment box.
SJ
Suthahar Jegatheesan

Cloud, AI & Mobile Solutions Architect · 18+ years across Azure, Google Cloud and Firebase, C#, Python, .NET MAUI and Flutter. Author of the Xamarin Q&A Book.

More in this series

No comments:

sponsored

What Colleagues Say

“Suthahar is one of the most thorough and knowledgeable cloud architects I’ve worked with. His depth on Azure and ability to make complex mobile solutions work cross-platform is remarkable. He always delivers beyond expectations.”

AT Arun T. Senior Engineering Manager · Direct Manager

“I’ve followed Suthahar’s MSDEVBUILD blog for years — practical, deep, always current. Working alongside him confirmed what I suspected: he’s as sharp in person as on paper, and a genuinely generous mentor and architect.”

RK Rajesh K. Lead Developer · Mindtree

Certifications & Recognition

AZ-300 · Azure Architect Technologies AZ-301 · Azure Architect Design AZ-104 · Azure Administrator Associate AI-100 · Designing Azure AI Solutions DP-900 · Azure Data Fundamentals MCPD · Windows Phone Certified SAFe® 4 Scrum Master

Technical Expertise

☁ Cloud Platforms Microsoft Azure — Expert · 18 yrs App Services · AKS · Functions · Cosmos DB · APIM · Entra ID AWS & Google Cloud — Advanced
πŸ€– AI & Automation Azure OpenAI / GenAI — Advanced · 5 yrs RAG Pipelines · Bot Framework · Cognitive Services · Vision & Speech AI · ML.NET
πŸ“± Mobile Architecture .NET MAUI & Xamarin — Expert · 12 yrs Flutter · Native iOS/Android · Offline-First · Secure Storage & Auth
πŸ”’ Identity & Security Microsoft Entra ID — Expert OAuth 2.0 · OIDC · Zero Trust · Conditional Access · RBAC · Key Vault

Speaking & Community

Microsoft User Group Malaysia Recurring speaker on Azure architecture, AI integration and .NET mobile development across Malaysia and APAC.
Global Azure Bootcamp — Chennai Presented “AI into Xamarin Mobile Apps” at GAB Chennai, part of the worldwide Global Azure community event.
AI & Azure OpenAI Community Events Workshops and live demos on RAG pipelines, AI agents and intelligent workflow automation since 2023.
Mobile & Cloud Workshops — Coimbatore Multi-day deep-dive sessions at GRG Computer Technology, KG Microsoft Innovation Center and RVS College of Arts and Science.
500+Blog Articles
50+Conference Talks
10K+Monthly Readers
30Public Repositories
3Continents Delivered
New home

MSDEVBUILD now publishes on blog.msdevbuild.com

Every new article lands there first — cloud and Azure, AI and GitHub Copilot, .NET MAUI and Flutter, web and Firebase. It installs as an app, opens like a native one and keeps working offline.

MSDEVBUILD Assistant Ask about Suthahar, Azure, AI or mentorship
Hi! I’m a simple FAQ bot for MSDEVBUILD. Tap a question below or type your own.