Skip to main content

logs

Show or stream the container-app logs for a service.

v2: reads IaC variables (subscription + common RG) from the cross-project IaC repo via ADO REST, discovers the container app via az containerapp list, and exec's az containerapp logs show. Override via SVC_APP_NAME_OVERRIDE + SVC_RG_OVERRIDE env vars. --follow keeps the stream open until Ctrl-C; --tail N starts with the last N lines and exits; --system includes platform logs. Gating — any access / discovery failure exits non-zero.

Category: Inspect / observe
Tags: container-app logs tail streaming follow

Usage

noclickops logs <service> [test|prod] [--follow|-f] [--tail N] [--system]

Flags

FlagDescription
testTail the test environment (default).
prodTail production.
--follow, -fStream new logs as they arrive.
--tail NStart with the last N lines, then exit.
--systemInclude system / platform logs alongside app logs.
-h, --helpShow this help and exit.

Example

noclickops logs frontend test --follow

Example output

noclickops logs v1.7.6 — frontend (test, --tail 5)

ℹ Container app: ca-abc100001-frontend (env: test, tail: 5)
2026-05-29T15:45:01.234Z stdout F Listening on port 3000
2026-05-29T15:45:23.567Z stdout F GET /health 200 1.2ms
2026-05-29T15:46:01.892Z stdout F GET /health 200 0.9ms
2026-05-29T15:46:31.123Z stdout F GET / 200 2.4ms
2026-05-29T15:47:01.456Z stdout F GET /health 200 1.1ms

# When you lack Reader on the deployed subscription, logs fails closed
# with a structured probe diagnostic (v1.7.1+):
✗ FAILED: discover container app for frontend
Looked for: ca-abc100001-frontend in RG rg-test-myteam-frontend-common of sub 3aec5ff4-...

Reason: You do not have access to subscription "3aec5ff4-...".
Action: → Ask your admin for Reader on "3aec5ff4-...", or use PIM to activate eligibility.
Subscriptions you DO have access to:
DEV - <team> - <name> <sub-id>
...

Override (skip discovery): SVC_APP_NAME_OVERRIDE=<name> SVC_RG_OVERRIDE=<rg>

Auth

az login + Reader on the IaC-declared subscription.

Depends on

  • az
  • git

Exit codes

CodeMeaning
0Logs streamed or printed; --follow ended cleanly.
1Service / container app not found, access denied, or invalid arg.

See also

Full --help output

Show full --help
noclickops v1.7.6 — logs

Show or stream the container-app logs for a service.

v2: reads IaC variables (subscription + common RG) from the cross-project IaC repo via ADO REST, discovers the container app via az containerapp list, and exec's az containerapp logs show. Override via SVC_APP_NAME_OVERRIDE + SVC_RG_OVERRIDE env vars. --follow keeps the stream open until Ctrl-C; --tail N starts with the last N lines and exits; --system includes platform logs. Gating — any access / discovery failure exits non-zero.

Category: inspect
Tags: container-app logs tail streaming follow

Usage:
noclickops logs <service> [test|prod] [--follow|-f] [--tail N] [--system]

Flags:
test Tail the test environment (default).
prod Tail production.
--follow, -f Stream new logs as they arrive.
--tail N Start with the last N lines, then exit.
--system Include system / platform logs alongside app logs.
-h, --help Show this help and exit.

Example:
noclickops logs frontend test --follow

Example output:
noclickops logs v1.7.6 — frontend (test, --tail 5)

ℹ Container app: ca-abc100001-frontend (env: test, tail: 5)
2026-05-29T15:45:01.234Z stdout F Listening on port 3000
2026-05-29T15:45:23.567Z stdout F GET /health 200 1.2ms
2026-05-29T15:46:01.892Z stdout F GET /health 200 0.9ms
2026-05-29T15:46:31.123Z stdout F GET / 200 2.4ms
2026-05-29T15:47:01.456Z stdout F GET /health 200 1.1ms

# When you lack Reader on the deployed subscription, logs fails closed
# with a structured probe diagnostic (v1.7.1+):
✗ FAILED: discover container app for frontend
Looked for: ca-abc100001-frontend in RG rg-test-myteam-frontend-common of sub 3aec5ff4-...

Reason: You do not have access to subscription "3aec5ff4-...".
Action: → Ask your admin for Reader on "3aec5ff4-...", or use PIM to activate eligibility.
Subscriptions you DO have access to:
DEV - <team> - <name> <sub-id>
...

Override (skip discovery): SVC_APP_NAME_OVERRIDE=<name> SVC_RG_OVERRIDE=<rg>

Auth:
az login + Reader on the IaC-declared subscription.

Depends on:
az git

Exit codes:
0 Logs streamed or printed; --follow ended cleanly.
1 Service / container app not found, access denied, or invalid arg.

See also:
info shell deploy