Where can i see App Service azure logs in Azure Portal - azure

I have read several docs and tutorials about Azure App Services.
What i want to do is to see my application log (errors, exceptions, etc.) in azure portal.
I have read i need to configure something in order to store my logs to a Storage account, Log analytics, or Event Hub.
But, this command line shows me the logs !
az webapp log tail --name myapp --resource-group mygroup
So there is no need to configure anything in order to collect log, if this command can do it...
How can i do the same thing in azure portal ?
And how can i see more than 10 lines with this tail ?
Thanks

I find using "Log Stream" very useful. It outputs all your logs in realtime to the portal.

You can enable logging on the app service by browsing to the app service logs section under the app service blade in the azure portal. Here is a link that shows how to do it: https://manojchoudhari.wordpress.com/2019/11/01/azure-app-service-and-diagnostics-logging/
Here is another article that shows how to enable diagnostic logging on the app service from the portal: https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs
In terms of the tailing command, the documentation doesn't have any params to do this so I doubt it you can increase the number of lines. However, you can output your logs with -o which you might already know.

When your web apps service is down you can get more details in "Diagnose and solve problems" in azure portal, you can get application logs, container issue, memory usage and other details.
https://learn.microsoft.com/en-us/azure/app-service/overview-diagnostics
If you want to debug your code deployed in app service inside azure portal then you can go to advanced tool and launch KUDU.
https://www.gslab.com/blogs/kudu-azure-web-app
Note: You need to have contributor permissions for this.

Related

Webapp Webjob logs not appearning in storage container

I have a webapp for which I have configured the App setting under configuration "AzureWebJobsDashboard" and "Azurewebjobstorage" which has the value for storage account and its access key.
As described in this article : https://www.marathonus.com/about/blog/introduction-to-azure-webjobs/
Once I set these setting and restart the app service, logs should appear in two storage containers as below
azure-webjobs-hosts
azure-jobs-host-output
However I see only azure-webjobs-hosts created and logging happening only sometimes. While I check for the webjob logs via Kudu site, I can see logs under the jobs folder, my job in txt files.
What am I doing wrong here?
I have followed the steps from the blog which you have provided and created one web job.
And Created one storage account and configured with the web job and published it into azure.
I can see created log files in storage account and kudu site.
You can restart your webjobs and check the storage account for the newly created logs.

Can I view the console logs of my web app in azure?

I'm deploying a web app in azure using the container registry I created and an auto-generated webhook. And now I want to access the console logs of the webapp container, is this possible?
Using the Portal, locate the Monitoring section in the App Service menu. Select App Service Logs and enable application logging.
You can access the logs via FTP or by using the Advanced Tools.
To stream the logs, select Log Stream to stream them directly in the Portal or use the CLI in a terminal:
az webapp log tail --name <appname> --resource-group <resourcegroupname>
There's a complete MS Learn module covering this topic.

Is there a way for me to offload an App Service Plan to Log Analytics?

I wan to see logs of the nodes of my app service plan in Log Analytics. I DONT want to do it with app service. I need to query data of my nodes with KQL
Unfortunately, it's impossible as of now. Please vote up for this user voice: Request to manage diagnostic settings for App Service Plan from Azure portal.
I also tried from both azure portal and rest api:
From azure portal, there is no the option of Diagnostic settings for app service plan.
From api Diagnostic Settings - Create Or Update: It throws an error says that app service plan is not in the whitelist which means that it's not supported currently.
Hope Microsoft can implement this feature for service plan asap:).

Azure Log Integration with Application Gateway diagnostic logs

Is there a way to integrate Azure Application Gateway logs to the Azure Log integration service. I can only see that Log integration seems to work for the VM logs, Security Center, Keyvault and Azure AD audit logs but nothing else.
How can we integrate other Azure cloud services(App gateway diagnostics etc.) with Azure Log Integration?
First, to answer the question about why you are don't see log integration for Application Gateway. Log Integration is only for resources like the VM, Security centre and other things you have mentioned. The Application Gateway is more like an appliance (like a tool that you use) rather than a service (that you consume). I think that is why they are separate and you are unable to mix them up.
I guess you have already seen this link about gateway diagnostics but I am putting it here anyway - https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-diagnostics
Perhaps, it is possible for you to take the logs from the Log Integration and then the logs from the gateway and combine them in a web app of your own design.

In azure, is there any way to know who and when an app was published?

We have an azure web app that we deploy with a publish profile and webdeploy. What I'd like to know is if there is any log about this deployment activity ? I read the logs but I can't find any trace of my deployments.
Note : we're not using git automated deployment
In the Azure Management Portal (manage.windowsazure.com), select Management Services and then the Operation Logs tab.
Or, in the Azure Preview Portal (portal.azure.com), select Browse All and then Audit Logs.

Resources