Aloe.Utils.Logging.Dump
1.1.0
dotnet add package Aloe.Utils.Logging.Dump --version 1.1.0
NuGet\Install-Package Aloe.Utils.Logging.Dump -Version 1.1.0
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="Aloe.Utils.Logging.Dump" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aloe.Utils.Logging.Dump" Version="1.1.0" />
<PackageReference Include="Aloe.Utils.Logging.Dump" />
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 Aloe.Utils.Logging.Dump --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aloe.Utils.Logging.Dump, 1.1.0"
#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 Aloe.Utils.Logging.Dump@1.1.0
#: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=Aloe.Utils.Logging.Dump&version=1.1.0
#tool nuget:?package=Aloe.Utils.Logging.Dump&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Aloe.Utils.Logging.Dump
A lightweight and easy-to-use library for logging byte arrays in hexadecimal dump format. Primarily used in applications that require debugging and binary data analysis.
Main Features
- Log byte arrays in hexadecimal dump format
- Line breaks every 16 bytes
- Performance-optimized implementation (using ValueStringBuilder)
- Integration with Microsoft.Extensions.Logging
Supported Environments
- .NET 9 and later
Usage Example
using Microsoft.Extensions.Logging;
using Aloe.Utils.Logging.Dump;
// Create logger factory
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder
.SetMinimumLevel(LogLevel.Debug)
.AddConsole();
});
// Get logger
var logger = loggerFactory.CreateLogger<Program>();
// Create sample data
byte[] sampleData =
[
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x2C, 0x20, 0x57,
0x6F, 0x72, 0x6C, 0x64, 0x21, 0x00, 0x00, 0x00,
];
// Execute dump output
logger.DumpDebug(sampleData);
Example output:
00000000 | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0123456789ABCDEF
-------- | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ----------------
00000000 | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ................
00000010 | 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F | ................
00000020 | 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 00 00 00 | Hello, World!...
License
MIT License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 was computed. 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.
-
net9.0
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Improved dump output format:
- Each line now shows offset, hex values, and ASCII side-by-side.
- Easier to read and debug binary data.