Soenneker.Maui.Blazor.BrowserLogger 4.0.245

Prefix Reserved
dotnet add package Soenneker.Maui.Blazor.BrowserLogger --version 4.0.245
                    
NuGet\Install-Package Soenneker.Maui.Blazor.BrowserLogger -Version 4.0.245
                    
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="4.0.245" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Maui.Blazor.BrowserLogger" Version="4.0.245" />
                    
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 4.0.245
                    
#r "nuget: Soenneker.Maui.Blazor.BrowserLogger, 4.0.245"
                    
#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@4.0.245
                    
#: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=4.0.245
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Maui.Blazor.BrowserLogger&version=4.0.245
                    
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 net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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
4.0.245 70 9/16/2026
4.0.243 70 9/16/2026
4.0.242 77 9/15/2026
4.0.240 80 9/14/2026
4.0.239 81 9/12/2026
4.0.238 91 9/12/2026
4.0.237 88 9/9/2026
4.0.236 90 9/8/2026
4.0.235 98 9/4/2026
4.0.234 103 9/4/2026
4.0.233 98 8/31/2026
4.0.232 96 8/30/2026
4.0.231 101 8/30/2026
4.0.230 97 8/30/2026
4.0.229 97 8/30/2026
4.0.228 106 8/30/2026
4.0.227 95 8/30/2026
4.0.226 101 8/29/2026
4.0.225 94 8/29/2026
4.0.224 113 8/12/2026
Loading failed

Update dependency Soenneker.Utils.CancellationScopes to 4.0.59 (#819)