Skip to content

Commit 21f42ed

Browse files
authored
Merge pull request #48182 from breyed/patch-2
Clarify logging filter rules example
2 parents 0cf8a35 + fda2428 commit 21f42ed

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

articles/azure-monitor/app/ilogger.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -322,22 +322,20 @@ The following examples apply filter rules to ApplicationInsightsLoggerProvider.
322322

323323
### Create filter rules in configuration with appsettings.json
324324

325-
For ApplicationInsightsLoggerProvider, the provider alias is `ApplicationInsights`. The following section of *appsettings.json* configures logs for *Warning* and above from all categories and *Error* and above from categories that start with "Microsoft" to be sent to `ApplicationInsightsLoggerProvider`.
325+
For ApplicationInsightsLoggerProvider, the provider alias is `ApplicationInsights`. The following section of *appsettings.json* instructs logging providers generally to log at level *Warning* and above. It then overrides the `ApplicationInsightsLoggerProvider` to log categories that start with "Microsoft" at level *Error* and above.
326326

327327
```json
328328
{
329329
"Logging": {
330+
"LogLevel": {
331+
"Default": "Warning"
332+
},
330333
"ApplicationInsights": {
331334
"LogLevel": {
332-
"Default": "Warning",
333335
"Microsoft": "Error"
334336
}
335-
},
336-
"LogLevel": {
337-
"Default": "Warning"
338337
}
339-
},
340-
"AllowedHosts": "*"
338+
}
341339
}
342340
```
343341

0 commit comments

Comments
 (0)