LogifyNet 1.0.0.1

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

LogifyNet

NuGet Version NuGet Downloads

πŸ’‘ Introduction

Logify is a lightweight and developer-friendly logging library for .NET applications. It provides file-based logging, automatic log rotation, and global configuration via appsettings.json, without requiring heavy frameworks or complex setup.

Ideal for small to medium projects needing a simple, reliable, production-ready logging system.

✨ Features

βœ” File-based logging

βœ” Automatic log rotation (max size & file count)

βœ” Thread-safe implementation

βœ” Global configuration through appsettings.json

βœ” Plug-and-play DI integration (IServiceCollection)

βœ” Lightweight with zero external dependencies

βœ” Supports Info, Warning, Error, Debug levels

πŸš€ Installation

Install from NuGet:

dotnet add package LogifyNet

Or via NuGet Package Manager:

Install-Package LogifyNet

βš™οΈ Configuration (appsettings.json)

Add a Logify section inside appsettings.json:

{
  "Logify": {
    "Path": "logs/app.log",
    "MaxFileSizeKb": 512,
    "MaxFiles": 5
  }
}

Configuration Options

| Key               | Description                                                                       |
| ----------------- | --------------------------------------------------------------------------------- |
| **Path**          | Log file path (folder + file name). Logify automatically creates missing folders. |
| **MaxFileSizeKb** | Maximum size before rotation occurs.                                              |
| **MaxFiles**      | Number of old log files to keep.                                                  |

🧩 Usage Example (Complete Setup) Program.cs (.NET 6/7/8)

var builder = WebApplication.CreateBuilder(args);

// Register Logify from configuration
builder.Services.AddLogify(builder.Configuration);

var app = builder.Build();

var logger = app.Services.GetRequiredService<ILogify>();
logger.Info("Application started.");
logger.Warning("This is a warning message.");
logger.Error("Error occurred.");
logger.Debug("Debug details...");

app.Run();

πŸ“˜ API Reference

πŸ”Ή ILogify

Main logging interface:

void Info(string message);
void Warning(string message);
void Error(string message);
void Debug(string message);

πŸ”Ή FileLogger

Responsible for:

Writing logs to file

Ensuring thread safety

Handling rotation based on size and retention limit

πŸ”Ή LogifyOptions

Automatically bound from appsettings:

public class LogifyOptions
{
    public string Path { get; set; }
    public int MaxFileSizeKb { get; set; }
    public int MaxFiles { get; set; }
}

πŸ“„ Example Log Output

2025-01-20 12:41:33 [INFO] Application started.
2025-01-20 12:41:34 [WARNING] Disk usage is high.
2025-01-20 12:41:35 [ERROR] Failed to load configuration.
2025-01-20 12:41:36 [DEBUG] Loading module X...

🎯 Summary

Logify is a minimal, reliable, and easy-to-use logging solution for .NET applications. It’s designed to be simple enough for beginners but powerful enough for production environments.

πŸ“„ License

MIT License

πŸ’¬ Author

Developed with ❀️ for clean, structured, and efficient .NET applications.

Developed by

Abdelwaheb AMMAR

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 is compatible.  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 Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on LogifyNet:

Package Downloads
DbEasy

DbEasy - .NET library to simplify database interaction (SQL queries, transactions, connections). DbEasy - Une librairie .NET pour simplifier l'interaction avec les bases de données (requêtes SQL, transactions, connexions).

DbEasy.ORM

A lightweight ORM extension built on top of DbEasy β€” simple, fast, and entity-based data management.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.1 2,757 12/3/2025
1.0.0-rc02 1,247 12/2/2025
1.0.0-rc01 179 11/15/2025
1.0.0-beta03 428 11/12/2025
1.0.0-beta02 284 11/11/2025
1.0.0-beta01 224 11/9/2025