Skip to content

Commit 390fa72

Browse files
authored
Update docs on disabling built-in logging
The current documentation recommends overriding the logging level for the entire Microsoft namespace, but this also suppresses logging for other Microsoft products, such as Entity Framework Core. Suggest updating this to recommend overriding Microsoft.AspNetCore instead.
1 parent 77c2c1a commit 390fa72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ Or [as JSON](https://github.com/serilog/serilog-formatting-compact):
109109
}
110110
```
111111

112-
To enable the middleware, first change the minimum level for `Microsoft` to `Warning` in your logger configuration or _appsettings.json_ file:
112+
To enable the middleware, first change the minimum level for `Microsoft.AspNetCore` to `Warning` in your logger configuration or _appsettings.json_ file:
113113

114114
```csharp
115-
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
115+
.MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning)
116116
```
117117

118118
Then, in your application's _Startup.cs_, add the middleware with `UseSerilogRequestLogging()`:

0 commit comments

Comments
 (0)