How to get logs through Diagnostic Setting in Azure App Service (Node.js stack)

Ayush Saran 0 Reputation points

Hi All, I am looking to get the console and app logs from Azure App Service streamed through Event Hub so I can further pipe it to my third party logging system. But unfortunately, I am not able to get any logs from Azure App Service (Windows-Node.js) even after I have enabled diagnostic setting (AppConsoleLogs,AppLogs etc). We have used standard commands such as console.error and console.log. Is there a limitation on language stack or do I have to anything else? Thank you

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
5,668 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 21,201 Reputation points Microsoft Employee

    Hi @Ayush Saran

    For your original question, there isn't any limitation on language stack. Whichever stack you're using, the logging gets piped in by default. Verify that your app is actually generating logs by using Log Stream in the portal or kudu console under Log Files ( On Windows, you can also select Debug Console > CMD > Logfiles for an explorer type view.

    Once you confirm your app is generating logs, then ensure the correct destination is selected for logs, i.e., Event Hub, Log Analytics Workspace, Storage Account. Specifically for Event Hub, you should be able to use the Azure portal to check if logs are being streamed to your destination resource on the resource itself.