You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-apps/log-streaming.md
+26-21Lines changed: 26 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,20 @@ ms.author: v-bcatherine
12
12
13
13
# View log streams in Azure Container Apps
14
14
15
-
While developing and troubleshooting your container app, it's important to see a container's logs in real-time. Container Apps lets you view a stream of your container app's [system logs](logging.md#system-logs) at the Container Apps environment level and at the app level. You can stream the [console logs](logging.md#container-console-logs) apps at the container level. Log streams are accessible though the Azure portal or the Azure CLI.
15
+
While developing and troubleshooting your container app, it's essential to see the [application logs](logging.md) for your container app in real time. Azure Container Apps lets you stream:
16
+
17
+
-[system logs](logging.md#system-logs) from the Container Apps environment and your container app.
18
+
- container [console logs](logging.md#container-console-logs) from your container app.
19
+
20
+
Log streams are accessible through the Azure portal or the Azure CLI.
16
21
17
22
## View log streams via the Azure portal
18
23
19
-
You can view system logs and application logs in the Azure portal. System logs are generated by the container app's runtime. Application logs are generated by your container app's application.
24
+
You can view system logs and console logs in the Azure portal. System logs are generated by the container app's runtime. Console logs are generated by your container app's application.
20
25
21
26
### Environment system log stream
22
27
23
-
To troubleshoot issues with in your container app environment, you can view the system log stream from your environment page. The log stream displays the system logs for the Container Apps service and the apps actively running in the environment:
28
+
To troubleshoot issues in your container app environment, you can view the system log stream from your environment page. The log stream displays the system logs for the Container Apps service and the apps actively running in the environment:
24
29
25
30
1. Go to your environment page in the Azure portal.
26
31
1. Select **Log stream** under the *Monitoring* section on the sidebar menu.
@@ -29,36 +34,36 @@ To troubleshoot issues with in your container app environment, you can view the
29
34
30
35
### Container app log stream
31
36
32
-
You can view a log stream of your container apps system or application logs from your container app page.
37
+
You can view a log stream of your container apps system or console logs from your container app page.
33
38
34
39
1. Go to your container app in the Azure portal.
35
40
1. Select **Log stream** under the *Monitoring* section on the sidebar menu.
36
41
1. To view the console log stream, select **Console**.
37
-
1. If you have multiple revisions, replicas, or containers, you can select from the pull-down menus to choose a container. If your app has only one container, you can skip this step.
42
+
1. If you have multiple revisions, replicas, or containers, you can select from the pull-down menus to choose a container. If your app has only one container, you can skip this step.
38
43
39
44
:::image type="content" source="media/observability/screenshot-log-stream-console-app.png" alt-text="Screenshot of Container Apps console log stream from app page.":::
40
45
41
-
1. To view the system log stream, select **System**. The system log stream displays the system logs for all running containers in the environment.
46
+
1. To view the system log stream, select **System**. The system log stream displays the system logs for all running containers in the environment.
42
47
43
48
:::image type="content" source="media/observability/screenshot-log-stream-system-app.png" alt-text="Screenshot of Container Apps system log stream from app page.":::
44
49
45
50
## View log streams via the Azure CLI
46
51
47
-
You can view your container app's log streams from the Azure CLI with the `az containerapp logs show` command or your container app's environment system log stream with the `az containerapp env logs show` command.
52
+
You can view your container app's log streams from the Azure CLI with the `az containerapp logs show` command or your container app's environment system log stream with the `az containerapp env logs show` command.
48
53
49
54
Control the log stream with the following arguments:
50
55
51
-
-`--tail` (Default) - View the last n log entries. Values are 0-300 entries. The value is 20.
52
-
-`--follow` - View a continuous live stream of the log entries.
56
+
-`--tail` (Default) - View the last n log messages. Values are 0-300 messages. The default is 20.
57
+
-`--follow` - View a continuous live stream of the log messages.
53
58
54
59
### Stream Container app logs
55
60
56
-
You can stream the system or console logs for your container app. To stream the container app system logs, use the `--type` argument with the value `system`. To stream the container console logs, use the `--type` argument with the value `console`. The default is `console`.
61
+
You can stream the system or console logs for your container app. To stream the container app system logs, use the `--type` argument with the value `system`. To stream the container console logs, use the `--type` argument with the value `console`. The default is `console`.
57
62
58
63
59
64
#### View container app system log stream
60
65
61
-
This example displays the last 50 system log entries for the container app.
66
+
This example uses the `--tail` argument to display the last 50 system log messages from the container app. Replace the \<placeholders\> with your container app's values.
62
67
63
68
# [Bash](#tab/bash)
64
69
@@ -82,7 +87,7 @@ az containerapp logs show `
82
87
83
88
---
84
89
85
-
This example displays a continuous live stream of system log entries for the container app.
90
+
This example displays a continuous live stream of system log messages from the container app using the `--follow` argument. Replace the \<placeholders\> with your container app's values.
86
91
87
92
# [Bash](#tab/bash)
88
93
@@ -114,11 +119,11 @@ To connect to a container's console log stream in a container app with multiple
114
119
115
120
| Argument | Description |
116
121
|----------|-------------|
117
-
|`--revision`| The revision name of the container to connect to. |
118
-
|`--replica`| The replica name of the container to connect to. |
119
-
|`--container`| The container name of the container to connect to. |
122
+
|`--revision`| The revision name. |
123
+
|`--replica`| The replica name in the revision. |
124
+
|`--container`| The container name to connect to. |
120
125
121
-
You can get the revision names with the `az containerapp revision list` command. Replace the \<placeholders\> with your container app's values.
126
+
You can get the revision names with the `az containerapp revision list` command. Replace the \<placeholders\> with your container app's values.
122
127
123
128
# [Bash](#tab/bash)
124
129
@@ -164,7 +169,7 @@ az containerapp replica list `
164
169
165
170
---
166
171
167
-
Live stream the container console logs with the `az container app show` command. Replace the \<placeholders\> with your container app's values.
172
+
Live stream the container console using the `az container app show` command with the `--follow` argument. Replace the \<placeholders\> with your container app's values.
168
173
169
174
# [Bash](#tab/bash)
170
175
@@ -196,7 +201,7 @@ az containerapp logs show `
196
201
197
202
Use `Ctrl-C` or `Cmd-C` to stop the live stream.
198
203
199
-
View the last 50 container console log entries with the `az containerapp logs show` command. Replace the \<placeholders\> with your container app's values.
204
+
View the last 50 console log messages using the `az containerapp logs show` command with the `--tail` argument. Replace the \<placeholders\> with your container app's values.
200
205
201
206
202
207
# [Bash](#tab/bash)
@@ -230,7 +235,7 @@ az containerapp logs show `
230
235
231
236
### View environment system log stream
232
237
233
-
Use the following command to view the live system log stream from the Container Apps service.
238
+
Use the following command with the `--follow` argument to view the live system log stream from the Container Apps environment. Replace the \<placeholders\> with your environment values.
234
239
235
240
# [Bash](#tab/bash)
236
241
@@ -255,7 +260,7 @@ az containerapp env logs show `
255
260
Use `Ctrl-C` or `Cmd-C` to stop the live stream.
256
261
257
262
258
-
This example displays the last 50 environment system log entries.
263
+
This example uses the `--tail` argument to display the last 50 environment system log messages. Replace the \<placeholders\> with your environment values.
259
264
260
265
# [Bash](#tab/bash)
261
266
@@ -278,4 +283,4 @@ az containerapp env logs show `
278
283
---
279
284
280
285
> [!div class="nextstepaction"]
281
-
> [View log streams from the Azure portal](log-streaming.md)
286
+
> [Log storage and monitoring options in Azure Container Apps](log-monitoring.md)
0 commit comments