Aloe.Utils.Logging.Dump
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Aloe.Utils.Logging.Dump --version 1.0.0
NuGet\Install-Package Aloe.Utils.Logging.Dump -Version 1.0.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.0.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.0.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.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aloe.Utils.Logging.Dump, 1.0.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.0.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.0.0
#tool nuget:?package=Aloe.Utils.Logging.Dump&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Aloe.Utils.Logging.Dump
バイト配列を16進ダンプ形式でログ出力するための軽量で使いやすいライブラリです。 主にデバッグやバイナリデータの解析が必要なアプリケーションで使用できます。
主な機能
- バイト配列を16進ダンプ形式でログ出力
- 16バイトごとの行区切り表示
- パフォーマンスに最適化された実装(ValueStringBuilder使用)
- Microsoft.Extensions.Loggingとの統合
対応環境
- .NET 9 以降
使用例
using Microsoft.Extensions.Logging;
using Aloe.Utils.Logging.Dump;
// ロガーファクトリーの作成
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder
.SetMinimumLevel(LogLevel.Debug)
.AddConsole();
});
// ロガーの取得
var logger = loggerFactory.CreateLogger<Program>();
// サンプルデータの作成
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
];
// ダンプ出力の実行
logger.DumpDebug(sampleData);
出力例:
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
ライセンス
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.