A lightweight, high-visibility logging library for .NET applications. ColoredLogger provides a set of fluent string extension methods to transform boring console output into structured, professional, and color-coded logs with zero configuration.
Install the package via the NuGet CLI:
dotnet add package ColoredLoggerSimply add using ColoredLogger; to your class. The library extends the string type, allowing you to trigger logs directly from your message strings.
Standardized methods for common application states. Each method handles the prefixing and coloring automatically.
"Server started on port 8080.".LogSuccess();
"Checking for updates...".LogInfo();
"Disk space is below 10%.".LogWarning();
"User authentication failed.".LogError();Terminal Output:
✅ [SUCCESS] Server started on port 8080.
ℹ️ [INFO] Checking for updates...
⚠️ [!] Disk space is below 10%.
❌ [ERROR] User authentication failed.
LogBanner creates a centered, bordered header. It automatically detects your console's width to ensure the border spans the full window.
"DATABASE MIGRATION".LogBanner('=');Terminal Output:
================================================================================
DATABASE MIGRATION
================================================================================
Use .Log() for standard output without prefixes. You can optionally pass any ConsoleColor.
"Initialising modules...".Log();
"Processing background task...".Log(ConsoleColor.Cyan);Terminal Output:
🔘 Initialising modules...
🔹 Processing background task...
Perfect for startup sequences or CLI tools:
using ColoredLogger;
"APP STARTUP".LogBanner('=');
"Loading environment variables...".Log();
"API Keys validated.".LogSuccess();
"Connecting to Database...".LogInfo();
"Connection timeout. Retrying (1/3)...".LogWarning();
"Critical Error: Could not connect to DB.".LogError();
"PROCESS TERMINATED".LogBanner('-');Visual Preview:
================================================================================
APP STARTUP
================================================================================
⚙️ Loading environment variables...
✅ [SUCCESS] API Keys validated.
ℹ️ [INFO] Connecting to Database...
⚠️ [!] Connection timeout. Retrying (1/3)...
❌ [ERROR] Critical Error: Could not connect to DB.
--------------------------------------------------------------------------------
PROCESS TERMINATED
--------------------------------------------------------------------------------
This project is licensed under the MIT License.