Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure: Application logs are switched off. You can turn them on using the 'Diagnostic logs' settings

This is hopefully a quick question.

I've got a Microsoft Azure Web Application.

If I navigate to the following location within my webapp in portal.azure.com:

Microsoft Azure > Browse > All resources > (MY APP) > Tools > Streaming logs

I get the error message:

Application logs are switched off. You can turn them on using the 'Diagnostic logs' settings.

However, it gives me no reference on where I go to do this. Checking under "Application Settings" for the application I do not see anything that matches this name, and I haven't found any of the "logging" settings to work to enable this "Streaming Logs".

Can anyone, please help point me to how I turn this on?

like image 320
Doug Avatar asked Jul 22 '15 20:07

Doug


People also ask

How do I enable diagnostic logs in Azure app?

To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs. Select On for either Application Logging (Filesystem) or Application Logging (Blob), or both. The Filesystem option is for temporary debugging purposes, and turns itself off in 12 hours.

How do I enable resource logs in Azure?

Send resource logs to a Log Analytics workspace to enable the features of Azure Monitor Logs, where you can: Correlate resource log data with other monitoring data collected by Azure Monitor. Consolidate log entries from multiple Azure resources, subscriptions, and tenants into one location for analysis together.


2 Answers

To enable diagnostic logging on your app in azure. Go to:

Portal.azure.com > (Your App) > Diagnostic settings > Add Diagnostic setting

To view your application and web server logs. Go to:

(Your App) > Log Stream 
like image 191
Faisal Mehboob Avatar answered Sep 16 '22 12:09

Faisal Mehboob


Turn it on here:

Azure -> App Service -> App Service logs -> Application Logging (Filesystem) -> ON

Then for 12 hours you can view it here:

Azure -> App Service -> Log stream

enter image description here

like image 30
IAmCoder Avatar answered Sep 17 '22 12:09

IAmCoder