I've deployed a Docker container to Azure App Services, and it works fine locally with Docker Desktop, where all my app files—including HTML and logs—are stored in the /user/local/tomcat directory. However, I can't seem to find a similar directory structure in Azure. I'm particularly trying to access a specific log file, but when I use Kudu to SSH, I can't find where that directory is located. Does anyone know how to access these logs or where this directory might be?
4 Answers
If you're open to it, I suggest switching to Azure Container Apps. They’re generally easier to work with compared to App Services and can be more cost-effective. In Container Apps, logs are captured automatically and can be viewed in real-time. Plus, if you need persistent storage, you can set up volumes to mount in the container. Just be aware that without a mounted volume, the container storage is ephemeral.
Check how your Docker container is set up. Does your Docker run command mount a directory from your local machine to the /user/local path, or does your Dockerfile copy files into the image? You might find what you're looking for by running it locally.
To access the logs, make sure you're SSH'ing into the container itself, not just the app service. That way, you'll be able to navigate to the correct directories where your logs are stored.
Are you certain you have a log file in the container? It's possible that what you see as logs in Docker is actually just the Docker log stream. You can grab the latest logs in a zip file directly from Kudu.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Fix Not Being Able To Add New Categories With Intuitive Category Checklist For Wordpress
Get Real User IP Without Installing Cloudflare Apache Module
How to Get Total Line Count In Visual Studio 2013 Without Addons
Install and Configure PhpMyAdmin on Centos 7
How To Setup PostfixAdmin With Dovecot and Postfix Virtual Mailbox