How can I view console or trace output in an azure app service?

Parkinson, Edward (DIS) 1 Reputation point
2021-09-06T07:19:45.21+00:00

Basic debug logging

How to do debug logging in azure. I want basic logging. Logging to pin down server side bugs such as the cause of a time out.

I tried this - but it did not work:
Solution by benjamingranados https://stackoverflow.com/questions/60696690/how-can-i-view-console-or-trace-output-in-an-azure-app-service-console-writelin

I can see get/post requests with the above solution, IIS messages I am guessing. But no logs.

3 of us have put over 8 hours into this and still no solution. Logs are something widely used, I would expect it to be a 5 min thing. Logs with google was super easy, but not with azure.

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,135 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Krunal 6 Reputation points
    2022-04-17T07:42:11.023+00:00

    I am agree with @Parkinson, Edward (DIS) .

    With GCP, It is easy to manage logs & use it. In Azure, It is totally opposite.

    1 person found this answer helpful.
    0 comments No comments

  2. Sreeju Nair 11,946 Reputation points
    2021-09-07T11:54:08.923+00:00

    You need to enable diagnostics logging for apps in Azure App Service.

    Refer: https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs

    0 comments No comments

  3. Andy Robinson 1 Reputation point
    2022-11-17T14:42:40.14+00:00

    Indeed, Azure's handling of logs is one of the more obtuse and bizarre implementations I've ever seen. But I'm sure after I understand the assumptions on which it was based, it will seem easy.

    0 comments No comments