SunamoLogging 26.5.6.8

dotnet add package SunamoLogging --version 26.5.6.8
                    
NuGet\Install-Package SunamoLogging -Version 26.5.6.8
                    
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="SunamoLogging" Version="26.5.6.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SunamoLogging" Version="26.5.6.8" />
                    
Directory.Packages.props
<PackageReference Include="SunamoLogging" />
                    
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 SunamoLogging --version 26.5.6.8
                    
#r "nuget: SunamoLogging, 26.5.6.8"
                    
#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 SunamoLogging@26.5.6.8
                    
#: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=SunamoLogging&version=26.5.6.8
                    
Install as a Cake Addin
#tool nuget:?package=SunamoLogging&version=26.5.6.8
                    
Install as a Cake Tool

SunamoLogging

A modular, platform-independent logging library for .NET providing multiple logger implementations with different output targets.

Features

  • LoggerBase - Base class for simple text-based logging with format string support
  • TemplateLoggerBase - Template logger with predefined message types (success, error, warning, info)
  • TypedLoggerBase - Typed logger using enum-based message categories
  • FileLogger - ILogger implementation writing to daily log files
  • LogRouter - Category-based log routing with enable/disable per category and JSON persistence
  • LogService - Service wrapper for logging dynamic objects as JSON via ILogger

Installation

dotnet add package SunamoLogging

Logger Implementations

Logger Base Class Purpose
SunamoLogger LoggerBase Production logger via ThisApp.Ordinal
DebugLogger LoggerBase Debug-only output
DummyLogger LoggerBase Null object pattern (no-op)
SunamoTemplateLogger TemplateLoggerBase Template messages via ThisApp.SetStatus
DebugTemplateLogger TemplateLoggerBase Debug template output to console
DummyTemplateLogger TemplateLoggerBase Null object pattern (no-op)
TypedSunamoLogger TypedLoggerBase Typed messages via ThisApp.SetStatus
TypedDebugLogger TypedLoggerBase Debug-only typed output
TypedDummyLogger TypedLoggerBase Null object pattern (no-op)

Quick Start

// Initialize loggers during app startup
InitApp.SetDebugLogger();

// Use the base logger
InitApp.Logger?.WriteLine("Processing item: {0}", itemName);

// Use the template logger
InitApp.TemplateLogger?.SavedToDrive(filePath);
InitApp.TemplateLogger?.Finished("Data import");

// Use the typed logger
InitApp.TypedLogger?.Success("Operation completed");
InitApp.TypedLogger?.Error("Connection failed");

File Logger with ILogger

var services = new ServiceCollection();
services.AddLogging(options => options.SetMinimumLevel(LogLevel.Warning));
services.AddSingleton(provider =>
{
    var factory = provider.GetRequiredService<ILoggerFactory>();
    factory.AddFile("MyApp");
    return factory.CreateLogger("General");
});

Target Frameworks

net10.0;net9.0;net8.0

Dependencies

  • Microsoft.Extensions.Logging.Abstractions

License

MIT

Product 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.

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
26.5.6.8 64 5/6/2026
26.5.5.7 82 5/5/2026
26.5.5.5 81 5/5/2026
26.5.5.4 85 5/5/2026
26.3.28.3 135 3/28/2026
26.2.7.2 109 2/7/2026
26.2.5.1 107 2/5/2026
26.2.4.1 103 2/4/2026
26.1.1.161 105 1/1/2026
26.1.1.160 111 1/1/2026
26.1.1.85 111 1/1/2026
25.12.31.2 107 12/31/2025
25.12.31.1 111 12/31/2025
25.12.21.1 186 12/21/2025
25.6.7.1 197 6/7/2025
25.5.20.1 206 5/20/2025
25.3.29.1 168 3/29/2025
25.1.25.1 182 1/25/2025
24.12.4.1 187 12/4/2024
24.11.20.4 169 11/20/2024
Loading failed

feat: Added net10.0 to TargetFrameworks