Skip to content

Commit 11d764f

Browse files
committed
edit az commands for log-streaming and container-console
1 parent 289dd6a commit 11d764f

File tree

2 files changed

+41
-13
lines changed

2 files changed

+41
-13
lines changed

articles/container-apps/container-console.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,44 +29,70 @@ Select **Console** in the **Monitoring** menu group from your container app page
2929

3030
Use the `az containerapp exec` command to connect to a container console. Select **Ctrl-D** to exit the console.
3131

32-
For example, connect to a container console in a container app with a single revision, replica, and container using the following command.
32+
For example, connect to a container console in a container app with a single revision, replica, and container using the following command. Replace the \<placeholders\> with your container app's values.
3333

3434
# [Bash](#tab/bash)
3535

3636
```azurecli
3737
az containerapp exec \
38-
--name album-api \
39-
--resource-group album-api-rg
38+
--name <ContainerAppName> \
39+
--resource-group <ResourceGroup>
4040
```
4141

4242
# [PowerShell](#tab/powershell)
4343

4444
```azurecli
4545
az containerapp exec `
46-
--name album-api `
47-
--resource-group album-api-rg
46+
--name <ContainerAppName> `
47+
--resource-group <ResourceGroup>
4848
```
4949

5050
---
5151

5252
To connect to a container console in a container app with multiple revisions, replicas, and containers include the `--revision`, `--replica`, and `--container` arguments with the `az containerapp exec` command.
5353

54-
Use the `az containerapp revision list` command to list active revision, replica and container names in your app. For example:
54+
You can get the revision names with the `az containerapp revision list` command. Replace the \<placeholders\> with your container app's values.
5555

5656
# [Bash](#tab/bash)
5757

5858
```azurecli
5959
az containerapp revision list \
60-
--name album-api \
61-
--resource-group album-api-rg
60+
--name <ContainerAppName> \
61+
--resource-group <ResourceGroup> \
62+
--query "[].name"
6263
```
6364

6465
# [PowerShell](#tab/powershell)
6566

6667
```azurecli
6768
az containerapp revision list `
68-
--name album-api `
69-
--resource-group album-api-rg
69+
--name <ContainerAppName> `
70+
--resource-group <ResourceGroup> `
71+
--query "[].name"
72+
```
73+
74+
---
75+
76+
Use the `az containerapp replica list` command to get the replica and container names. Replace the \<placeholders\> with your container app's values.
77+
78+
# [Bash](#tab/bash)
79+
80+
```azurecli
81+
az containerapp replica list \
82+
--name <ContainerAppName> \
83+
--resource-group <ResourceGroup> \
84+
--revision <RevisionName> \
85+
--query "[].{Containers:properties.containers[].name, Name:name}"
86+
```
87+
88+
# [PowerShell](#tab/powershell)
89+
90+
```azurecli
91+
az containerapp replica list `
92+
--name <ContainerAppName> `
93+
--resource-group <ResourceGroup> `
94+
--revision <RevisionName> `
95+
--query "[].{Containers:properties.containers[].name, Name:name}"
7096
```
7197

7298
---

articles/container-apps/log-streaming.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ While developing and troubleshooting your container app, it's important to see a
1616

1717
## Azure portal
1818

19-
To view a container app's log stream in the Azure portal with these steps.
19+
View a container app's log stream in the Azure portal with these steps.
2020

2121
1. Navigate to your container app in the Azure portal.
2222
1. Select **Log stream** under the *Monitoring* section on the sidebar menu.
@@ -28,14 +28,16 @@ After a container is selected, the log stream is displayed in the viewing pane.
2828

2929
## Azure CLI
3030

31-
You can view container's log stream from the Azure CLI with the `az containerapp logs show` command. You can use these arguments to:
31+
You can view a container's log stream from the Azure CLI with the `az containerapp logs show` command. You can use these arguments to:
3232

3333
- View previous log entries with the `--tail` argument.
3434
- View a live stream with the `--follow`argument.
3535

3636
Use `Ctrl/Cmd-C` to stop the live stream.
3737

38-
For example, you can list the last 50 container log entries in a container app with a single revision, replica, and container using the following command.
38+
For example, you can list the last 50 container log entries in a container app with a single container using the following command.
39+
40+
This example live streams the a container's log entries.
3941

4042
# [Bash](#tab/bash)
4143

0 commit comments

Comments
 (0)