Skip to content

Commit 2b8fd59

Browse files
committed
add aspnet revisions to dotnet doc, clarify 6.0.0 version
1 parent 6a575f5 commit 2b8fd59

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ The configuration refresh is triggered by the incoming requests to your web app.
230230

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

233-
## Logging and Monitoring (v6.0.0 and later)
233+
## Logging and Monitoring
234234

235235
Logs are output upon configuration refresh and contain detailed information on key-values retrieved from your App Configuration store and configuration changes made to your application.
236236

@@ -264,9 +264,11 @@ Logs are output upon configuration refresh and contain detailed information on k
264264
Service request failed.
265265
```
266266

267-
268267
Using `ILogger` is the preferred method in ASP.NET applications and is prioritized as the logging source if an instance of `ILoggerFactory` is present. However, if `ILoggerFactory` is not available, logs can alternatively be enabled and configured through the [instructions for .NET Core apps](./enable-dynamic-configuration-dotnet-core.md#logging-and-monitoring-v600-and-later). For more information, see [logging in .NET Core and ASP.NET Core](/aspnet/core/fundamentals/logging).
269268

269+
> [!NOTE]
270+
> Logging is available if you use version **6.0.0** or later of the `Microsoft.Extensions.Configuration.AzureAppConfiguration` package.
271+
270272
## Clean up resources
271273

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

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,18 @@ Logs are output upon configuration refresh and contain detailed information on k
151151
| Verbose | Logs include the key and label of key-values your application monitors for changes from your App Configuration store. The information also includes whether the key-value has changed compared with what your application has already loaded. Enable logs at this level to troubleshoot your application if a configuration change didn't happen as expected. |
152152
| Informational | Logs include the keys of configuration settings updated during a configuration refresh. Values of configuration settings are omitted from the log to avoid leaking sensitive data. You can monitor logs at this level to ensure your application picks up expected configuration changes. |
153153
| Warning | Logs include failures and exceptions that occurred during configuration refresh. Occasional occurrences can be ignored because the configuration provider will continue using the cached data and attempt to refresh the configuration next time. You can monitor logs at this level for repetitive warnings that may indicate potential issues. For example, you rotated the connection string but forgot to update your application. |
154-
- The logging category is `Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh`, which appears before each log.
155-
- Here are some example logs at each event level:
154+
155+
You can enable logging at the `Verbose` event level by specifying the `EventLevel.Verbose` parameter, as done in the following example. These instructions apply to all other event levels as well. This example also enables logs for only the `Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh` category.
156+
```csharp
157+
using var listener = new AzureEventSourceListener((eventData, text) =>
158+
{
159+
if (eventData.EventSource.Name == "Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh")
160+
{
161+
Console.WriteLine("[{1}] {0}: {2}", eventData.EventSource.Name, eventData.Level, text);
162+
}
163+
}, EventLevel.Verbose);
164+
```
165+
- The logging category is `Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh`, which appears before each log. Here are some example logs at each event level:
156166
```console
157167
[Verbose] Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh:
158168
Key-value read from App Configuration. Change:'Modified' Key:'ExampleKey' Label:'ExampleLabel' Endpoint:'https://examplestore.azconfig.io'
@@ -164,16 +174,9 @@ Logs are output upon configuration refresh and contain detailed information on k
164174
A refresh operation failed.
165175
Service request failed.
166176
```
167-
- You can enable logging at the `Verbose` event level by specifying the `EventLevel.Verbose` parameter, as done in the following example. These instructions apply to all other event levels as well. This example also enables logs for only the `Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh` category.
168-
```csharp
169-
using var listener = new AzureEventSourceListener((eventData, text) =>
170-
{
171-
if (eventData.EventSource.Name == "Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh")
172-
{
173-
Console.WriteLine("[{1}] {0}: {2}", eventData.EventSource.Name, eventData.Level, text);
174-
}
175-
}, EventLevel.Verbose);
176-
```
177+
178+
> [!NOTE]
179+
> Logging is available if you use version **6.0.0** or later of the `Microsoft.Extensions.Configuration.AzureAppConfiguration` package.
177180

178181
## Clean up resources
179182

0 commit comments

Comments
 (0)