QuickLog.net 1.0.0

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

QuickLog.net

QuickLog.net is a simple .NET logging library

It supports logging:

  • to the console
  • to a file

Features

  • Dependency injection via AddQuickLog(...)
  • Basic log levels (Trace, `Error``)
  • Console output with timestamp
  • File output with automatic directory creation

Requirements

  • .NET 10.0

Configuration

Configure it with DI:

using QuickLog.net;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

services.AddQuickLog(options =>
{
	options.EnableConsoleLogging = true;
	options.EnableFileLogging = true;
	options.FileLoggingPath = "logs/exemple";
    options.AddDateToFileFormat = true;
});

Available options:

  • EnableConsoleLogging (bool?): enables/disables console logging (default true)
  • EnableFileLogging (bool?): enables/disables file logging (default false)
  • FileLoggingPath (string?): log file path (for example logs/exemple)
  • AddDateToFileFormat (bool?): enables/diasble date at the end of the file (for example logs/exemple260311.log)

Usage

Inject the logger:

using QuickLog.net.Logging;

public class App
{
	private readonly IQuickLog _quickLog;

	public App(IQuickLog quickLog)
	{
		_quickLog = quickLog;
	}

	public void Run()
	{
		_quickLog.LogTrace("Application started");
		_quickLog.LogError("This is a sample error log");
	}
}

Log Format

Each line is written using this format:

[yyyy-MM-dd HH:mm:ss] [LogType] message

Example:

[2026-03-10 14:30:12] [Trace] Application started

Log To A File

To write logs to a file, you must:

  1. set EnableFileLogging = true
  2. set FileLoggingPath

Valid example:

services.AddQuickLog(options =>
{
	options.EnableConsoleLogging = true;
	options.EnableFileLogging = true;
	options.FileLoggingPath = "logs/exemple";
});

The directory is created automatically if needed.

Run The Example

From the solution root:

dotnet run --project Exemple/Exemple.csproj

The file will be created here:

Exemple/logs/quicklog.log

Quick Structure

  • QuickLog.net/Logging/QuickLog.cs: logger implementation
  • QuickLog.net/Logging/IQuickLog.cs: logger contract
  • QuickLog.net/Model/QuickLogOption.cs: configuration options
  • QuickLog.net/DI/ServiceCollectionExtension.cs: AddQuickLog extension
  • Exemple/Program.cs: usage example
Product Compatible and additional computed target framework versions.
.NET 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
1.0.0 109 3/11/2026