Chronicler.Diagnostics
1.0.0
dotnet add package Chronicler.Diagnostics --version 1.0.0
NuGet\Install-Package Chronicler.Diagnostics -Version 1.0.0
<PackageReference Include="Chronicler.Diagnostics" Version="1.0.0" />
<PackageVersion Include="Chronicler.Diagnostics" Version="1.0.0" />
<PackageReference Include="Chronicler.Diagnostics" />
paket add Chronicler.Diagnostics --version 1.0.0
#r "nuget: Chronicler.Diagnostics, 1.0.0"
#:package Chronicler.Diagnostics@1.0.0
#addin nuget:?package=Chronicler.Diagnostics&version=1.0.0
#tool nuget:?package=Chronicler.Diagnostics&version=1.0.0
Chronicler.Diagnostics
Dependency-free diagnostic channels, lazy logging, and exception guards for
engine-agnostic .NET libraries and hosts. Targets netstandard2.1 and
net10.0. The same package supports standard and Lean applications; it does not
depend on Chronicler.Core, JSON, or MemoryPack.
using System;
using Chronicler.Diagnostics;
var channel = new DiagnosticChannel("MyLibrary")
{
MinimumLevel = DiagnosticLevel.Warning,
Sink = WriteDiagnostic
};
channel.Warn($"Buffer capacity reached {capacity}.");
ChronicleGuard.ThrowIfNull(settings);
static void WriteDiagnostic(in DiagnosticEvent diagnostic)
=> Console.WriteLine($"[{diagnostic.Level}] {diagnostic.Channel}: {diagnostic.Message}");
The example assumes the host supplies capacity and settings. With C# 10 or
later, interpolated messages skip formatted expressions when their channel level
is disabled, and interpolated exception messages are built only when the guard
throws.
C# 9 callers use the string logging overloads. Their interpolation runs before
the call; guard it with channel.IsEnabled(DiagnosticLevel.Warning) when
formatting should be skipped. Pass explicit guard parameter names when needed:
ChronicleGuard.ThrowIfNull(settings, nameof(settings)).
Channels start disabled with a no-op sink. DiagnosticLogger provides an
optional base for library-specific facades, with normal/debug channels and a
configurable formatter and output handler. Libraries retain ownership of their
channel names. Diagnostics are host-facing observations, not serialized state or
replay hashes.
See the diagnostics guide and migration guide.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
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.0 | 90 | 10/31/2026 |