Soenneker.Maui.Blazor.BrowserLogger 11.0.296

Prefix Reserved
dotnet add package Soenneker.Maui.Blazor.BrowserLogger --version 11.0.296
                    
NuGet\Install-Package Soenneker.Maui.Blazor.BrowserLogger -Version 11.0.296
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Maui.Blazor.BrowserLogger" Version="11.0.296" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Maui.Blazor.BrowserLogger" Version="11.0.296" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Maui.Blazor.BrowserLogger" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Maui.Blazor.BrowserLogger --version 11.0.296
                    
#r "nuget: Soenneker.Maui.Blazor.BrowserLogger, 11.0.296"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Maui.Blazor.BrowserLogger@11.0.296
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Maui.Blazor.BrowserLogger&version=11.0.296
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Maui.Blazor.BrowserLogger&version=11.0.296
                    
Install as a Cake Tool

Soenneker.Maui.Blazor.BrowserLogger

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Writes Microsoft.Extensions.Logging messages from a .NET MAUI Blazor app to the browser developer console.

Installation

dotnet add package Soenneker.Maui.Blazor.BrowserLogger

Registration

Add the provider in MauiProgram.cs:

using Soenneker.Maui.Blazor.BrowserLogger.Extensions;

builder.Logging.AddMauiBlazorBrowser();

The provider can receive log entries immediately, but JavaScript output begins after it has an IJSRuntime. Initialize it once from a component that lives for the duration of the BlazorWebView, such as MainLayout.razor:

@inject IJSRuntime JSRuntime
@inject IMauiBlazorJsInteropLoggingService BrowserLogging

@code {
    protected override void OnInitialized()
    {
        BrowserLogging.Initialize(JSRuntime);
    }
}

Add these namespaces to the component or _Imports.razor:

@using Microsoft.JSInterop
@using Soenneker.Maui.Blazor.BrowserLogger.Abstract

Usage

Use the standard ILogger<T> API anywhere in the app:

@inject ILogger<Orders> Logger

@code {
    private void OrderFailed(Exception exception)
    {
        Logger.LogError(exception, "Could not load the order");
    }
}

Trace and debug messages use console.debug, information uses console.info, warnings use console.warn, and errors and critical messages use console.error. Configure category and minimum-level filtering through the normal .NET logging configuration.

Messages are delivered asynchronously and may be lost during shutdown or when the browser cannot keep up. Before initialization, the service retains only the newest buffered messages.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.296 51 11/20/2026
11.0.295 49 11/20/2026
11.0.294 49 11/19/2026
11.0.291 95 11/12/2026
11.0.290 95 11/12/2026
11.0.288 87 11/11/2026
11.0.286 55 11/10/2026
11.0.285 59 11/10/2026
11.0.284 54 11/10/2026
11.0.283 83 10/27/2026
11.0.282 70 10/26/2026
11.0.281 70 10/26/2026
11.0.279 62 10/26/2026
4.0.278 102 10/25/2026
4.0.277 98 10/25/2026
4.0.276 105 10/15/2026
4.0.275 106 10/15/2026
4.0.274 98 10/15/2026
4.0.273 106 10/15/2026
4.0.272 110 10/15/2026
Loading failed

Update dependency Soenneker.Utils.CancellationScopes to 11.0.82 (#961)