diff --git a/aspnetcore/blazor/fundamentals/logging.md b/aspnetcore/blazor/fundamentals/logging.md index e867d1f9cd9e..c3ff2fd2367f 100644 --- a/aspnetcore/blazor/fundamentals/logging.md +++ b/aspnetcore/blazor/fundamentals/logging.md @@ -1749,9 +1749,21 @@ var connection = new HubConnectionBuilder() *This section only applies to Blazor WebAssembly apps.* -Log Blazor authentication messages at the or logging levels with a log filter for in `Program.cs`. +Log Blazor authentication messages at the or logging levels with a logging configuration in app settings or by using a log filter for in `Program.cs`. -The following example: +In an app settings file (for example, `wwwroot/appsettings.Developoment.json`): + +```json +"Logging": { + "LogLevel": { + "Microsoft.AspNetCore.Components.WebAssembly.Authentication": "Debug" + } +} +``` + +For more information on how to enable a Blazor WebAssembly app to read app settings files, see . + +Using a log filter, the following example: * Activates logging for the `Debug` build configuration using a [C# preprocessor directive](/dotnet/csharp/language-reference/preprocessor-directives). * Logs Blazor authentication messages at the log level.