To view the recent logs from a container app, you can use the command below.
az containerapp logs show -n $CONTAINER_APP_NAME -g $RESOURCE_GROUP
{"TimeStamp": "2026-08-13T11:28:11.53311", "Log": "Connecting to the container 'ai-api'..."}
{"TimeStamp": "2026-08-13T11:28:11.63802", "Log": "Successfully Connected to container: 'ai-api' [Revision: 'ai-api--0000002', Replica: 'ai-api--0000002-567594dbcc-5fldt']"}
{"TimeStamp": "2026-08-13T11:25:02.3637515+00:00", "Log": "F [2026-08-13 11:25:02 +0000] [7] [INFO] Starting gunicorn 21.2.0"}
{"TimeStamp": "2026-08-13T11:25:02.3639933+00:00", "Log": "F [2026-08-13 11:25:02 +0000] [7] [INFO] Listening at: http://0.0.0.0:8000 (7)"}
{"TimeStamp": "2026-08-13T11:25:02.364006+00:00", "Log": "F [2026-08-13 11:25:02 +0000] [7] [INFO] Using worker: sync"}
{"TimeStamp": "2026-08-13T11:25:02.3660105+00:00", "Log": "F [2026-08-13 11:25:02 +0000] [8] [INFO] Booting worker with pid: 8"}
{"TimeStamp": "2026-08-13T11:25:02.4536786+00:00", "Log": "F [2026-08-13 11:25:02 +0000] [9] [INFO] Booting worker with pid: 9"}
{"TimeStamp": "2026-08-13T11:27:03.115942+00:00", "Log": "F 100.100.0.142 - - [13/Aug/2026:11:27:03 +0000] \"GET /health HTTP/1.1\" 200 21 \"-\" \"curl/8.18.0\""}
{"TimeStamp": "2026-08-13T11:27:14.2029176+00:00", "Log": "F 2026-08-13 11:27:14,202 - main - INFO - Service info requested"}
{"TimeStamp": "2026-08-13T11:27:14.2033772+00:00", "Log": "F 100.100.0.142 - - [13/Aug/2026:11:27:14 +0000] \"GET / HTTP/1.1\" 200 306 \"-\" \"curl/8.18.0\""}
{"TimeStamp": "2026-08-13T11:27:53.3882706+00:00", "Log": "F 2026-08-13 11:27:53,388 - main - INFO - Document processing request received"}
{"TimeStamp": "2026-08-13T11:27:53.3884613+00:00", "Log": "F 2026-08-13 11:27:53,388 - main - INFO - Processing document: document.txt (165 chars)"}
{"TimeStamp": "2026-08-13T11:27:53.3891493+00:00", "Log": "F 2026-08-13 11:27:53,388 - main - INFO - Result saved to /tmp/processed/6e9e2edb-c48b-44c2-a014-d46b02a869e9.json"}
{"TimeStamp": "2026-08-13T11:27:53.3895481+00:00", "Log": "F 100.100.0.142 - - [13/Aug/2026:11:27:53 +0000] \"POST /process HTTP/1.1\" 200 872 \"-\" \"curl/8.18.0\""}
{"TimeStamp": "2026-08-13T11:28:01.886793+00:00", "Log": "F 2026-08-13 11:28:01,886 - main - INFO - Service info requested"}
{"TimeStamp": "2026-08-13T11:28:01.8871441+00:00", "Log": "F 100.100.0.142 - - [13/Aug/2026:11:28:01 +0000] \"GET / HTTP/1.1\" 200 306 \"-\" \"python-requests/2.33.0\""}