SmartLogger 3.0.0
dotnet add package SmartLogger --version 3.0.0
NuGet\Install-Package SmartLogger -Version 3.0.0
<PackageReference Include="SmartLogger" Version="3.0.0" />
<PackageVersion Include="SmartLogger" Version="3.0.0" />
<PackageReference Include="SmartLogger" />
paket add SmartLogger --version 3.0.0
#r "nuget: SmartLogger, 3.0.0"
#:package SmartLogger@3.0.0
#addin nuget:?package=SmartLogger&version=3.0.0
#tool nuget:?package=SmartLogger&version=3.0.0
SmartLogger: Lightweight Logging for High-Performance Systems
Build observability without sacrificing performance or simplicity.
SmartLogger is a lightweight, extensible logging framework for .NET applications, designed to provide structured, reliable, and configurable logging without unnecessary complexity.
Design Philosophy
Logging must never compromise application stability.
SmartLogger is built with a strong focus on:
- Predictable behavior under load
- Minimal runtime overhead
- Clear and flexible configuration
- Extensibility without complexity
Architecture Overview
SmartLogger follows a clean, layered pipeline:
Log Call
↓
Logger
↓
Layout (Pattern + Tokens)
↓
Formatter (PlainText / JSON / XML)
↓
Appender (Console / File / etc.)
This design ensures:
- Separation of concerns
- Easy extensibility
- Maintainable logging pipeline
Key Features
- Log levels with priority filtering
- Customizable log layouts (pattern + tokens)
- Multiple output formats (PlainText, JSON, XML)
- Multiple appenders (Console, FileSystem, extensible)
- Async logging support for high throughput
- Runtime configuration reload (hot reload)
- Correlation ID support (AsyncLocal-based)
- Thread-safe logging pipeline
- File rolling strategies (size/time-based)
💡 Why SmartLogger?
SmartLogger helps you:
- Maintain consistent logging standards
- Trace requests across execution flows using correlation IDs
- Handle high log volumes safely
- Dynamically update logging without restarting apps
- Build observable systems with minimal setup
Quick Start
1️⃣ Install via NuGet
Install-Package SmartLogger
2️⃣ Initialize Logger
JSON Configuration
var provider = new JsonConfigurationProvider(
"smartlogger.json",
enableAutoReload: true);
LoggerManager.Initialize(provider);
In-Memory Configuration
var config = new LogConfigurationHolder
{
RootLogLevel = LogLevel.INFO,
Appenders = new List<AppenderConfiguration>
{
new AppenderConfiguration
{
Destination = new DestinationConfiguration
{
Type = LogOutputDestination.Console
},
AppenderLogLevel = LogLevel.DEBUG
}
}
};
LoggerManager.Initialize(new InMemoryConfigurationProvider(config));
3️⃣ Get Logger
var logger = LoggerManager.GetLogger("OrderService");
4️⃣ Log Messages
logger.Info("Order created successfully.");
logger.Warning("Inventory running low.");
logger.Error("Payment gateway timeout.");
Correlation Logging Example
using (LogContext.BeginCorrelationScope("REQ-123"))
{
logger.Info("Processing request...");
logger.Error("Request failed");
}
Example JSON Configuration
{
"rootLogLevel": "DEBUG",
"appenders": [
{
"destination": {
"type": "Console"
},
"appenderLogLevel": "DEBUG",
"formatter": {
"outputFormat": "PlainText",
"layoutType": "Detailed"
}
}
]
}
For more information on configuration refer: SmartLogger_Configuration_Guide
Ideal Use Cases
- Learning system design
- Web APIs
- Background workers
- Microservices
- High-throughput systems
Summary
SmartLogger provides a clean and extensible logging solution for .NET applications, with support for:
- Structured logging
- Correlation tracking
- Runtime configuration
- High-performance scenarios
Designed to help you build observable, maintainable, and resilient systems.
| Product | Versions 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. |
-
net8.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.