Simple Logger

A lightweight, extensible logging library for .NET

v2.1.0 Apache 2.0 License .NET 6+ 10K+ downloads

Introduction

Simple Logger is a minimal yet powerful logging library designed for .NET applications. It provides a clean, simple API while offering extensibility for advanced use cases.

Whether you're building a small console application or a large enterprise system, Simple Logger gives you the tools you need without the complexity of larger logging frameworks.

Quick Start

Get started with Simple Logger in just a few steps:

bash

# Install via NuGet
dotnet add package SimpleDotNet.Logger
                                
C#

using SimpleLogger;

// Create a logger
var logger = new Logger();

// Log messages
logger.Info("Application started");
logger.Warning("Low disk space");
logger.Error("Failed to connect to database", exception);

// Configure output
logger.AddOutput(new ConsoleOutput());
logger.AddOutput(new FileOutput("app.log"));
                                

Key Features

Multiple Output Targets

Log to console, file, database, or implement your own custom output.

Custom Log Levels

Built-in levels (Debug, Info, Warning, Error, Critical) plus custom levels.

Structured Logging

Support for structured logging with template syntax and object serialization.

Async Support

Asynchronous logging operations to minimize impact on application performance.

Installation

Choose your preferred installation method:

bash

# Package Manager
Install-Package SimpleDotNet.Logger

# .NET CLI
dotnet add package SimpleDotNet.Logger

# Package Reference

                                                

bash

# Clone the repository
git clone https://github.com/simpledotnet/simple-logger.git

# Build the project
cd simple-logger
dotnet build

# Reference the built assembly