WB.Logging 1.0.0

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

WB.Logging

An easy-to-use non-blocking logging library for .NET applications, designed to provide a simple and efficient way to log messages with various levels of severity.

✨ Features

  • Non-blocking: Logs are processed asynchronously, ensuring that your application remains responsive.
  • Multiple Sinks: Supports multiple output targets (sinks) such as console, file, and more.
  • Configurable: Easily configure log levels, formats, and sinks to suit your needs.
  • Extensible: Create custom sinks and loggers to fit your specific requirements.
  • Log anything: Log messages of any type, including complex objects.

⬇️ Log Sinks

Sink Type Description
ConsoleLogSink Logs messages to the console using System.Console.

Note: More log sinks will be added in the future, and you can also create your own custom sinks by implementing the ILogSink interface.

🚀 Example

using WB.Logging;

// Step 1:  Create a logger with name "MyApp"
await using ILogger logger = new Logger("MyApp");

// Step 2:  Attach a console sink to the logger
using IDisposable attachment = logger.AttachConsole();

// Step 3:  Log messages with different severity levels
logger.LogInfo("This is an informational message.");
logger.LogWarning("This is a warning message.");
logger.LogError("This is an error message.");

Notes:

  • Step 1: The await using statement in the example, ensures that the logger is properly disposed of after use, allowing it to flush any remaining log messages before the application exits.
  • Step 2: The IDisposable returned by AttachConsole() can be used to detach the console sink when it's no longer needed, preventing further log messages from being sent to the console.
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.
  • 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
2.0.0-preview.9 134 5/11/2026
2.0.0-preview.8 54 5/6/2026
2.0.0-preview.7 75 4/30/2026
2.0.0-preview.6 300 4/15/2026
2.0.0-preview.5 97 4/14/2026
2.0.0-preview.4 52 4/14/2026
2.0.0-preview.3 68 4/13/2026
2.0.0-preview.2 55 4/8/2026
2.0.0-preview.1 62 4/6/2026
1.0.0 122 2/24/2026
1.0.0-preview.3 61 2/22/2026