Dignus.Log 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dignus.Log --version 1.0.0
                    
NuGet\Install-Package Dignus.Log -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="Dignus.Log" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dignus.Log" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Dignus.Log" />
                    
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 Dignus.Log --version 1.0.0
                    
#r "nuget: Dignus.Log, 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 Dignus.Log@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=Dignus.Log&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Dignus.Log&version=1.0.0
                    
Install as a Cake Tool

Dignus.Log

Attribute-driven, zero-GC logging for the Dignus.
Fast format rendering, pluggable targets (console/file/database), and DI-backed configuration.


Highlights

  • Flexible formatting: ${symbol[:format]} pipeline (ex: datetime, level, message, callsite)
  • Attribute mapping: [LogElement("...")], [LogTarget("...")] auto-registration
  • Zero-GC composition: pooled builders, no reflection on hot paths
  • Multi-target routing: per-logger rules, min level filtering
  • DI integration: targets resolved via Dignus.DependencyInjection
  • Graceful shutdown: buffered drain & target dispose on process exit

Built-in Format Elements

  • datetime (customizable format)
  • level
  • message
  • callsite (filePath : lineNumber)
  • callerFileName, callerFilePath, callerLineNumber
  • literal (raw text)

Built-in Targets

Target Key Notes
Console console Per-level colors, custom format
File file Rolling: Hour / Day / Week / Month, archive naming, max archives, auto-flush, keep-open
Database database Provider/connection/command via config, parameterized by format renderers

Operational Notes

  • Buffered write with lock-free signaling; drains on dispose
  • Safe under concurrency; minimal allocations on hot path
  • Default format: ${datetime} | ${level} | ${message}

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<targets>
		<target id ="consoleConfig" logTarget ="console" format="${datetime} | ${level} | ${message} ${callerFileName} : ${callerLineNumber}">
			<option category="color" id="Debug" value="DarkGray"/>
			<option category="color" id="Info" value="Green"/>
			<option category="color" id="Error" value="DarkRed"/>
			<option category="color" id="Fatal" value="Red"/>
		</target>
		<target id="fileConfig" logTarget ="file" format="${datetime} | ${level} | ${message} | ${callerFileName} : ${callerLineNumber}">
			<option category ="fileName" value="./logs/LogFile.txt"/>
			<option category ="archiveFileName" value ="./logs/archive/log.{#}.txt"/>
			<option category ="archiveRolling" value ="Day"/>
			<option category ="maxArchiveFiles" value ="7"/>
			<option category ="keepOpenFile" value="true"/>
      <option category ="autoFlush" value="true"/>
		</target>
		<target id ="databaseConfig" logTarget="database">
			<database dbConnection ="test"
                dbProvider="MySql.Data.MySqlClient.MySqlConnection, MySql.Data"
                keepConnectionOpen ="true"
                dbCommand="insert into log (logged, level, message)
										values (@logged, @level, @message);">

				<option category="parameter" id="@level" value="${level}"></option>
				<option category="parameter" id="@logged" value="${datetime}"></option>
				<option category="parameter" id="@message" value="${message}"></option>
				<option category="parameter" id="@callsite" value="${callerFileName} : ${callerLineNumber}"></option>
			</database>
		</target>
	</targets>
	<loggers>
		<logger id ="consoleConfig" minLogLevel="Debug"></logger>
		<logger id ="fileConfig" minLogLevel="Info"></logger>
		
	</loggers>
</configuration>
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 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 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. 
.NET Framework net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

  • .NETFramework 4.8.1

  • net8.0

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dignus.Log:

Package Downloads
Dignus.Extensions.Logging

Lightweight logging extension for integrating Dignus.Log with Microsoft.Extensions.Logging

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.10 44 4/25/2026
1.0.9 225 2/21/2026
1.0.8 479 12/11/2025
1.0.7 199 11/23/2025
1.0.6 258 11/22/2025
1.0.5 424 11/19/2025
1.0.4 280 11/2/2025
1.0.3 272 10/30/2025
1.0.2 206 10/29/2025
1.0.1 207 10/28/2025
1.0.0 205 10/28/2025