@Joel Lozano ensure that Application Logging (Filesystem) is enabled in the Azure Portal under your App Service's Diagnostics settings, and verify that the Log Level is set to the appropriate level (e.g., Information or Verbose). Use the Log Stream feature in the Azure Portal to view real-time logs, and check the LogFiles directory in your App Service's file system via the Kudu Console for any logs under /home/LogFiles
. For Application Insights, double-check the instrumentation key and configurations in your next.config.js
or environment variables, and ensure the SDK is initialized correctly in your application code. Sometimes, logs might not appear due to buffering issues, so try flushing the logs explicitly in your code. Finally, restart your App Service and redeploy your application to ensure all configurations are applied correctly.
Azure App Service Not Displaying Next.js Server Component Logs
I've deployed my Next.js (Node.js + React.js) app to Azure App Service (Linux), and I noticed that console.logs aren't being displayed in the Azure Log Monitor. If an error occurs in an API route, I can see the error output in the Log Monitor, but I can't see any logs from my own code. I've been trying to set up Azure Application Insights to receive the logs to work around the issue, but I can't get that to work in the cloud, although it works in my local Windows environment (I can send logs to App Insights and view them in the portal). I'm not sure, but thinking these issues may be related.
Azure App Service
1 answer
Sort by: Most helpful
-
brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
2025-01-04T07:48:18.3633333+00:00