From 390fa721db83404b4ab7cd0ab1ba96723cb4664a Mon Sep 17 00:00:00 2001 From: DavidCoghlan <42351331+DavidCoghlan@users.noreply.github.com> Date: Wed, 25 Sep 2019 18:20:05 +0100 Subject: [PATCH] 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. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8732504..00678bb 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,10 @@ Or [as JSON](https://github.com/serilog/serilog-formatting-compact): } ``` -To enable the middleware, first change the minimum level for `Microsoft` to `Warning` in your logger configuration or _appsettings.json_ file: +To enable the middleware, first change the minimum level for `Microsoft.AspNetCore` to `Warning` in your logger configuration or _appsettings.json_ file: ```csharp - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning) ``` Then, in your application's _Startup.cs_, add the middleware with `UseSerilogRequestLogging()`: