Meziantou.AspNetCore.Components.LogViewer
1.0.22
Prefix Reserved
dotnet add package Meziantou.AspNetCore.Components.LogViewer --version 1.0.22
NuGet\Install-Package Meziantou.AspNetCore.Components.LogViewer -Version 1.0.22
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="Meziantou.AspNetCore.Components.LogViewer" Version="1.0.22" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.AspNetCore.Components.LogViewer" Version="1.0.22" />
<PackageReference Include="Meziantou.AspNetCore.Components.LogViewer" />
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 Meziantou.AspNetCore.Components.LogViewer --version 1.0.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.AspNetCore.Components.LogViewer, 1.0.22"
#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 Meziantou.AspNetCore.Components.LogViewer@1.0.22
#: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=Meziantou.AspNetCore.Components.LogViewer&version=1.0.22
#tool nuget:?package=Meziantou.AspNetCore.Components.LogViewer&version=1.0.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.AspNetCore.Components.LogViewer
A Blazor component for displaying and analyzing log entries with support for filtering, highlighting, and interactive exploration.
Features
- Display log entries with customizable formatting
- Syntax highlighting for URLs, quoted text, and custom patterns
- Flexible timestamp formats (full datetime, relative time, hidden)
- Interactive log details with table and JSON views
- Line numbers for easy reference
- Log level styling with distinct visual indicators
- Clickable URLs in log messages
- Multi-line log support with expandable details
Usage
Basic Example
@page "/logs"
@using Meziantou.AspNetCore.Components
<LogViewer Entries="@logEntries" />
@code {
private List<LogEntry> logEntries = new()
{
new LogEntry
{
Timestamp = DateTimeOffset.UtcNow,
Message = "Application started",
LogLevel = LogLevel.Information
},
new LogEntry
{
Timestamp = DateTimeOffset.UtcNow.AddSeconds(1),
Message = "Processing request",
LogLevel = LogLevel.Debug
},
new LogEntry
{
Timestamp = DateTimeOffset.UtcNow.AddSeconds(2),
Message = "An error occurred",
LogLevel = LogLevel.Error
},
};
}
Advanced Example with Configuration
@page "/logs"
@using Meziantou.AspNetCore.Components
<LogViewer
Entries="@logEntries"
TimestampDisplayFormat="TimestampDisplayFormat.DateTimeThenRelativeTime"
ShowLineNumbers="true"
LogHighlighters="@highlighters" />
@code {
private ILogHighlighter[] highlighters = new ILogHighlighter[]
{
new UrlLogHighlighter(),
new QuoteLogHighlighter()
};
private List<LogEntry> logEntries = new()
{
new LogEntry
{
Timestamp = DateTimeOffset.UtcNow,
Message = "Check out https://example.com for more info",
LogLevel = LogLevel.Information
},
new LogEntry
{
Timestamp = DateTimeOffset.UtcNow.AddSeconds(5),
Message = "User 'admin' logged in",
LogLevel = LogLevel.Information
},
};
}
Log Entries with Structured Data
@code {
private List<LogEntry> logEntries = new()
{
new LogEntry
{
Timestamp = DateTimeOffset.UtcNow,
Message = "Request completed with details",
LogLevel = LogLevel.Information,
Data = new
{
UserId = 123,
Endpoint = "/api/users",
Duration = TimeSpan.FromMilliseconds(245),
Headers = new Dictionary<string, string>
{
{ "User-Agent", "Mozilla/5.0" },
{ "Content-Type", "application/json" }
}
}
},
};
}
When log entries have Data attached, users can click to expand and view the details in either table or JSON format.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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.
-
net10.0
- Microsoft.AspNetCore.Components (>= 10.0.5)
- Microsoft.AspNetCore.Components.Web (>= 10.0.5)
-
net8.0
- Microsoft.AspNetCore.Components (>= 8.0.25)
- Microsoft.AspNetCore.Components.Web (>= 8.0.25)
-
net9.0
- Microsoft.AspNetCore.Components (>= 9.0.14)
- Microsoft.AspNetCore.Components.Web (>= 9.0.14)
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 |
|---|---|---|
| 1.0.22 | 85 | 3/29/2026 |
| 1.0.21 | 92 | 3/15/2026 |
| 1.0.20 | 97 | 2/22/2026 |
| 1.0.19 | 109 | 1/18/2026 |
| 1.0.18 | 178 | 12/14/2025 |
| 1.0.17 | 175 | 11/16/2025 |
| 1.0.16 | 132 | 11/2/2025 |
| 1.0.15 | 187 | 10/27/2025 |
| 1.0.14 | 117 | 10/19/2025 |
| 1.0.13 | 196 | 9/21/2025 |
| 1.0.12 | 358 | 9/16/2025 |
| 1.0.11 | 250 | 9/3/2025 |
| 1.0.10 | 179 | 8/10/2025 |
| 1.0.9 | 204 | 7/13/2025 |
| 1.0.8 | 237 | 6/15/2025 |
| 1.0.7 | 255 | 5/18/2025 |
| 1.0.6 | 245 | 4/13/2025 |
| 1.0.5 | 256 | 3/16/2025 |
| 1.0.4 | 223 | 3/1/2025 |
| 1.0.3 | 213 | 11/17/2024 |
Loading failed