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-options.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: craigshoemaker
6
6
ms.service: azure-container-apps
7
7
ms.custom: devx-track-azurecli
8
8
ms.topic: conceptual
9
-
ms.date: 09/29/2022
9
+
ms.date: 12/05/2024
10
10
ms.author: cshoe
11
11
---
12
12
@@ -22,12 +22,12 @@ Container Apps application logs consist of two different categories:
22
22
23
23
You can choose between these logs destinations:
24
24
25
-
-**Log Analytics**: Azure Monitor Log Analytics is the default storage and viewing option. Your logs are stored in a Log Analytics workspace where they can be viewed and analyzed using Log Analytics queries. To learn more about Log Analytics, see [Azure Monitor Log Analytics](log-monitoring.md).
25
+
-**Log Analytics**: Azure Monitor Log Analytics is the default storage and viewing option. Your logs are stored in a Log Analytics workspace where they can be viewed and analyzed using Log Analytics queries. To learn more about Log Analytics, see [Azure Monitor Log Analytics](log-monitoring.md).
26
26
-**Azure Monitor**: Azure Monitor routes logs to one or more destinations:
27
27
- Log Analytics workspace for viewing and analysis.
28
28
- Azure storage account to archive.
29
29
- Azure event hub for data ingestion and analytic services. For more information, see [Azure Event Hubs](../event-hubs/event-hubs-about.md).
30
-
- An Azure partner monitoring solution such as Datadog, Elastic, Logz.io and others. For more information, see [Partner solutions](../partner-solutions/overview.md).
30
+
- An Azure partner monitoring solution such as Datadog, Elastic, Logz.io, and others. For more information, see [Partner solutions](../partner-solutions/overview.md).
31
31
-**Don't save logs**: You can disable the storage of log data. When disabled, you can still view real-time container logs via the **Logs stream** feature in your container app. For more information, see [Log streaming](log-streaming.md).
32
32
33
33
When *Don't save logs* or the *Azure Monitor* destination is selected, the **Logs** menu item providing the Log Analytics query editor in the Azure portal is disabled.
@@ -39,47 +39,47 @@ Use these steps to configure the logging options for your Container Apps environ
39
39
1. Go to the **Logging Options** on your Container Apps environment window in the portal.
40
40
:::image type="content" source="media/observability/log-opts-screenshot-log-analytics.png" alt-text="Screenshot of logs destinations.":::
41
41
1. You can choose from the following **Logs Destination** options:
42
-
-**Log Analytics**: With this option, you select a Log Analytics workspace to store your log data. Your logs can be viewed through Log Analytics queries. To learn more about Log Analytics, see [Azure Monitor Log Analytics](log-monitoring.md).
42
+
-**Log Analytics**: With this option, you select a Log Analytics workspace to store your log data. Your logs can be viewed through Log Analytics queries. To learn more about Log Analytics, see [Azure Monitor Log Analytics](log-monitoring.md).
43
43
-**Azure Monitor**: Azure Monitor routes your logs to a destination. When you select this option, you must select **Diagnostic settings** to complete the configuration after you select **Save** on this page.
44
-
-**Don't save logs**: This option disables the storage of log data.
44
+
-**Don't save logs**: This option disables the storage of log data.
1. If you have selected **Azure Monitor** as your logs destination, you must configure **Diagnostic settings**. The **Diagnostic settings** item appears below the **Logging options** menu item.
47
+
1. If you selected **Azure Monitor** as your logs destination, you must configure **Diagnostic settings**. The **Diagnostic settings** item appears below the **Logging options** menu item.
48
48
49
49
### Diagnostic settings
50
50
51
51
When you select **Azure Monitor** as your logs destination, you must configure the destination details. Select **Diagnostic settings** from the left side menu of the Container Apps Environment window in the portal. You might need to refresh the page for **Diagnostic settings** to appear.
52
52
53
53
:::image type="content" source="media/observability/log-opts-diag-setting-menu-item.png" alt-text="Screenshot Diagnostic setting menu item.":::
54
54
55
-
Destination details are saved as *diagnostic settings*. You can create up to five diagnostic settings for your container app environment. You can configure different log categories for each diagnostic setting. For example, create one diagnostic setting to send the system logs category to one destination, and another to send the container console logs category to another destination.
55
+
Destination details are saved as *diagnostic settings*. You can create up to five diagnostic settings for your container app environment. You can configure different log categories for each diagnostic setting. For example, create one diagnostic setting to send the system logs category to one destination, and another to send the container console logs category to another destination.
56
56
57
57
To create a new *diagnostic setting*:
58
58
59
59
1. Select **Add diagnostic setting**.
60
60
:::image type="content" source="media/observability/diag-setting-new-diag-setting.png" alt-text="Screenshot Diagnostic setting Add new diagnostic setting.":::
-**Send to a partner solution**: Select from Azure partner solutions.
71
+
-**Send to a partner solution**: Select from Azure partner solutions.
72
72
1. Select **Save**.
73
73
74
74
For more information about Diagnostic settings, see [Diagnostic settings in Azure Monitor](/azure/azure-monitor/essentials/diagnostic-settings).
75
75
76
76
## Configure options using the Azure CLI
77
77
78
-
Configure logs destination for your Container Apps environment using the Azure CLI `az containerapp create` and `az containerapp update` commands with the `--logs-destination` argument.
78
+
Configure logs destination for your Container Apps environment using the Azure CLI `az containerapp create` and `az containerapp update` commands with the `--logs-destination` argument.
79
79
80
80
The destination values are: `log-analytics`, `azure-monitor`, and `none`.
81
81
82
-
For example, to create a Container Apps environment using an existing Log Analytics workspace as the logs destination, you must provide the `--logs-destination` argument with the value `log-analytics` and the `--logs-destination-id` argument with the value of the Log Analytics workspace resource ID. You can get the resource ID from the Log Analytics workspace page in the Azure portal or from the ```az monitor log-analytics workspace show``` command.
82
+
For example, to create a Container Apps environment using an existing Log Analytics workspace as the logs destination, you must provide the `--logs-destination` argument with the value `log-analytics` and the `--logs-destination-id` argument with the value of the Log Analytics workspace resource ID. You can get the resource ID from the Log Analytics workspace page in the Azure portal or from the ```az monitor log-analytics workspace show``` command.
83
83
84
84
Replace \<PLACEHOLDERS\> with your values:
85
85
@@ -102,7 +102,7 @@ az containerapp env update \
102
102
--logs-destination azure-monitor
103
103
```
104
104
105
-
When `--logs-destination` is set to `azure-monitor`, create diagnostic settings to configure the destination details for the log categories with the `az monitor diagnostics-settings` command.
105
+
When `--logs-destination` is set to `azure-monitor`, create diagnostic settings to configure the destination details for the log categories with the `az monitor diagnostics-settings` command.
106
106
107
107
To send app-level metrics to Log Analytics:
108
108
@@ -116,7 +116,7 @@ az monitor diagnostic-settings create \
116
116
--workspace <LOG_ANALYTICS_ARM_RESOURCE_ID>
117
117
```
118
118
119
-
For more information about Azure Monitor diagnostic settings commands, see [az monitor diagnostic-settings](/cli/azure/monitor/diagnostic-settings). Container Apps log categories are `ContainerAppConsoleLogs` and `ContainerAppSystemLogs`.
119
+
For more information about Azure Monitor diagnostic settings commands, see [az monitor diagnostic-settings](/cli/azure/monitor/diagnostic-settings). Container Apps log categories are `ContainerAppConsoleLogs` and `ContainerAppSystemLogs`.
0 commit comments