Guidelines for Exporting Logs

Admin Portal

  • Log in to the admin portal. Navigate to App Container Logs under the Insights section in the left blade.

  • Select the required Application/Container logs using the checkboxes, then click Export to download them.

Export app container log files

To retrieve additional logs from various Azure services:

1. App Service

Log Stream:

  • In the App Service blade, under Monitoring, select Log stream.

  • This opens a live log streaming session for your application.

Log stream

Deployment Center Logs:

Note: App Service does not persist deployment logs after restarts or after a certain retention period.

  • From the left blade, select Deployment Center.

  • Click on Logs.

  • These logs include build steps, deployment actions, and any errors or warnings.

  • If a deployment is in progress, logs will stream live in the Logs pane.

Deployment center logs
  • Click the Download toggle and then click on Download the .zip file to export the logs.

Download logs

2. Azure Kubernetes Services

CLI:

  • From the AKS Overview tab, select Connect, then use Open Cloud Shell to set the subscription and configure the cluster credentials.

Open Cloud Shell

In Cloud Shell, use the following commands to view pod logs:

  • List all pods in a namespace:

kubectl get pods -n <namespace>

  • View logs of a specific pod:

kubectl logs <pod-name> -n <namespace>

  • Stream logs in real-time:

kubectl logs -f <pod-name> -n <namespace>

  • Export logs of specific pod

kubectl logs <pod-name> -n <namespace> > podlogs.txt

3. Container Instance

Container Logs:

  • On the left blade, click Containers.

  • Select the specific container you want to inspect.

  • Click on Logs; this shows the individual container’s logs.

Container logs

Last updated