Unable to Enable Application Logs for Linux Web App on Azure App Service
Jacob Hughes-Hallett
0
Reputation points
Details:
I am trying to enable application logging for my Django app running on a Linux-based Azure App Service. My app is set up with the following details:
- Operating System: Linux
- Runtime Stack: Python 3.12
- App Service Plan: PremiumV2 (P1v2)
- Deployment Provider: VSTSRM (Azure DevOps)
Despite updating the App Service settings to enable Application Logging (File System) and restarting the app, I am unable to see any real-time logs in the Log Stream. The log stream is connected, but no new logs are coming through, and I keep seeing messages like:
Logging is not enabled for this container. Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
Steps I've Taken:
- Enabled Application Logging (File System) from the App Service settings.
- Modified the Django settings to configure logging in the
settings.py
file. - Restarted the app and tested various requests that should generate logs.
- Verified that my role has sufficient permissions, but I'm still not seeing the full diagnostic logging options (e.g., log levels, detailed error messages).
- The app is running fine in the normal browser, but in incognito mode, I get a 500 error on one specific page, and I need logs to troubleshoot.
Questions:
- Why am I not able to see logs in the Log Stream even though I have enabled logging from the App Service settings?
- Are there additional steps to configure logging for a Linux-based Azure Web App running Django?
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
Sign in to answer