From 8169e0b7f663a2cd184d28f4c184e21cb0cf6a76 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:23:50 -0500 Subject: [PATCH 1/2] Update WASM auth logging section --- aspnetcore/blazor/fundamentals/logging.md | 38 ++++++++++++----------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/aspnetcore/blazor/fundamentals/logging.md b/aspnetcore/blazor/fundamentals/logging.md index 777fa602d678..2178636e6bd1 100644 --- a/aspnetcore/blazor/fundamentals/logging.md +++ b/aspnetcore/blazor/fundamentals/logging.md @@ -1751,30 +1751,32 @@ var connection = new HubConnectionBuilder() 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`. -In an app settings file (for example, `wwwroot/appsettings.Development.json`): +Use ***either** of the following approaches: -```json -"Logging": { - "LogLevel": { - "Microsoft.AspNetCore.Components.WebAssembly.Authentication": "Debug" +* In an app settings file (for example, `wwwroot/appsettings.Development.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 . + For more information on how to enable a Blazor WebAssembly app to read app settings files, see . -Using a log filter, the following example: +* 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. + * 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. -```csharp -#if DEBUG - builder.Logging.AddFilter( - "Microsoft.AspNetCore.Components.WebAssembly.Authentication", - LogLevel.Debug); -#endif -``` + ```csharp + #if DEBUG + builder.Logging.AddFilter( + "Microsoft.AspNetCore.Components.WebAssembly.Authentication", + LogLevel.Debug); + #endif + ``` > [!NOTE] > Blazor WebAssembly apps only log to the client-side [browser developer tools](https://developer.mozilla.org/docs/Glossary/Developer_Tools) console. From 2556f668780d6458d3f68e468d9adc56626e4349 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:26:57 -0500 Subject: [PATCH 2/2] Update logging.md --- aspnetcore/blazor/fundamentals/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/fundamentals/logging.md b/aspnetcore/blazor/fundamentals/logging.md index 2178636e6bd1..f6ba19c26b01 100644 --- a/aspnetcore/blazor/fundamentals/logging.md +++ b/aspnetcore/blazor/fundamentals/logging.md @@ -1751,7 +1751,7 @@ var connection = new HubConnectionBuilder() 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`. -Use ***either** of the following approaches: +Use ***either*** of the following approaches: * In an app settings file (for example, `wwwroot/appsettings.Development.json`):