Skip to content

Commit 578e2b9

Browse files
Merge pull request #291474 from Akhilesh-microsoft/ACA/log_options
[ACA: log-options]: Verified the article, reviewed the content, and fixed all editorial issues. Updated ms.date w.r.t freshness pass.
2 parents 47dcfb2 + edbd98a commit 578e2b9

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

articles/container-apps/log-options.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.custom: devx-track-azurecli
88
ms.topic: conceptual
9-
ms.date: 09/29/2022
9+
ms.date: 12/05/2024
1010
ms.author: cshoe
1111
---
1212

@@ -22,12 +22,12 @@ Container Apps application logs consist of two different categories:
2222

2323
You can choose between these logs destinations:
2424

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).
2626
- **Azure Monitor**: Azure Monitor routes logs to one or more destinations:
2727
- Log Analytics workspace for viewing and analysis.
2828
- Azure storage account to archive.
2929
- 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).
3131
- **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).
3232

3333
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
3939
1. Go to the **Logging Options** on your Container Apps environment window in the portal.
4040
:::image type="content" source="media/observability/log-opts-screenshot-log-analytics.png" alt-text="Screenshot of logs destinations.":::
4141
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).
4343
- **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.
4545
1. Select **Save**.
4646
:::image type="content" source="media/observability/log-opts-screenshot-page-save-button.png" alt-text="Screenshot Logging options page.":::
47-
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.
4848

4949
### Diagnostic settings
5050

5151
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.
5252

5353
:::image type="content" source="media/observability/log-opts-diag-setting-menu-item.png" alt-text="Screenshot Diagnostic setting menu item.":::
5454

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.
5656

5757
To create a new *diagnostic setting*:
5858

5959
1. Select **Add diagnostic setting**.
6060
:::image type="content" source="media/observability/diag-setting-new-diag-setting.png" alt-text="Screenshot Diagnostic setting Add new diagnostic setting.":::
6161
1. Enter a name for your diagnostic setting.
6262
:::image type="content" source="media/observability/diag-setting-dialog.png" alt-text="Screenshot Diagnostics settings dialog.":::
63-
1. Select the log **Category groups** or **Categories** you want to send to this destination. You can select one or more categories.
63+
1. Select the log **Category groups** or **Categories** you want to send to this destination. You can select one or more categories.
6464

6565
1. Select one or more **Destination details**:
66-
- **Send to Log Analytics workspace**: Select from existing Log Analytics workspaces.
66+
- **Send to Log Analytics workspace**: Select from existing Log Analytics workspaces.
6767
:::image type="content" source="media/observability/diag-setting-log-analytics-console-log.png" alt-text="Screenshot diagnostic settings Log Analytics destination.":::
6868
- **Archive to a storage account**: This option is deprecated.
69-
- **Stream to an event hub**: Select from Azure event hubs.
69+
- **Stream to an event hub**: Select from Azure event hubs.
7070
:::image type="content" source="media/observability/diag-settings-event-hub.png" alt-text="Screenshot Diagnostic settings event hub destination.":::
71-
- **Send to a partner solution**: Select from Azure partner solutions.
71+
- **Send to a partner solution**: Select from Azure partner solutions.
7272
1. Select **Save**.
7373

7474
For more information about Diagnostic settings, see [Diagnostic settings in Azure Monitor](/azure/azure-monitor/essentials/diagnostic-settings).
7575

7676
## Configure options using the Azure CLI
7777

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.
7979

8080
The destination values are: `log-analytics`, `azure-monitor`, and `none`.
8181

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.
8383

8484
Replace \<PLACEHOLDERS\> with your values:
8585

@@ -102,7 +102,7 @@ az containerapp env update \
102102
--logs-destination azure-monitor
103103
```
104104

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.
106106

107107
To send app-level metrics to Log Analytics:
108108

@@ -116,7 +116,7 @@ az monitor diagnostic-settings create \
116116
--workspace <LOG_ANALYTICS_ARM_RESOURCE_ID>
117117
```
118118

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`.
120120

121121

122122
## Next steps

0 commit comments

Comments
 (0)