Skip to content

Commit 5202486

Browse files
committed
add troubleshooting sections and log information to dynamic configuration guides
1 parent d1e9588 commit 5202486

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

articles/azure-app-configuration/enable-dynamic-configuration-aspnet-core.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,29 @@ The configuration refresh is triggered by the incoming requests to your web app.
226226
| TestApp:Settings:Message | Data from Azure App Configuration - now with live updates! |
227227
| TestApp:Settings:Sentinel | 2 |
228228

229+
230+
229231
1. Refresh the browser a few times. When the cache expires after 30 seconds, the page shows with updated content.
230232

231233
![Launching updated quickstart app locally](./media/quickstarts/aspnet-core-app-launch-local-after.png)
232234

235+
## Troubleshooting
236+
237+
You can use refresh logs to identify errors and debug your application.
238+
239+
- Logging will be enabled automatically as long as `services.AddAzureAppConfiguration()` is invoked in your `ConfigureServices` method. No code changes are needed
240+
- Logs will be output to the console at different log levels.
241+
242+
| Log Level | Description |
243+
|---|---|
244+
| Information | Updates to values stored in the configuration. |
245+
| Debug | Updates to key-values in the App Configuration store. |
246+
| Warning | Indicates errors that occurred during refresh. |
247+
- The logging category will be `Microsoft.Extensions.Configuration.AzureAppConfiguration.Refresh`.
248+
249+
For more information on how to utilize these logs, follow the configuration instructions for [logging in .NET Core and ASP.NET Core](/aspnet/core/fundamentals/logging).
250+
Logs can alternatively be enabled and configured through [Azure SDK logging](/dotnet/azure/sdk/logging).
251+
233252
## Clean up resources
234253

235254
[!INCLUDE [azure-app-configuration-cleanup](../../includes/azure-app-configuration-cleanup.md)]

articles/azure-app-configuration/enable-dynamic-configuration-dotnet-core.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,19 @@ Calling the `ConfigureRefresh` method alone won't cause the configuration to ref
140140
> [!NOTE]
141141
> Since the cache expiration time was set to 10 seconds using the `SetCacheExpiration` method while specifying the configuration for the refresh operation, the value for the configuration setting will only be updated if at least 10 seconds have elapsed since the last refresh for that setting.
142142

143+
## Troubleshooting
144+
145+
You can use refresh logs to identify errors and debug your application. For information on how to enable these logs, follow the instructions for [Azure SDK logging](/dotnet/azure/sdk/logging).
146+
147+
- Logs will be output to the console at different log levels.
148+
149+
| Log Level | Description |
150+
|---|---|
151+
| Information | Updates to values stored in the configuration. |
152+
| Debug | Updates to key-values in the App Configuration store. |
153+
| Warning | Indicates errors that occurred during refresh. |
154+
- The logging category will be `Microsoft.Extensions.Configuration.AzureAppConfiguration.Refresh`.
155+
143156
## Clean up resources
144157

145158
[!INCLUDE [azure-app-configuration-cleanup](../../includes/azure-app-configuration-cleanup.md)]

0 commit comments

Comments
 (0)