NeoSimpleLogger is a lightweight, color-coded logging utility for .NET applications. It provides structured logging with timestamps, customizable colors for different log levels, and optional stack trace output in debug mode. Perfect for debugging and monitoring application behavior.
- Color-Coded Log Levels:
INFO(Green)WARN(Yellow)FATAL(Red)ERROR(Red)DEBUG(Magenta)
- Customizable Colors: Define your own color scheme for each log level.
- Timestamps: Automatically adds the current time in
HH:mm:ss.fffformat. - Debug Stack Trace: In
DEBUGmode, shows the call stack for non-ERROR/WARNlogs.
using NeoSimpleLogger;
var logger = new Logger(Logger.OutputType.Console);
logger.LogInformation("Application started");
logger.LogWarning("Low memory detected");
logger.LogError("Critical failure occurred");
logger.LogDebug("Debugging internal state");
logger.LogCritical("App is dead");[14:30:45.123] INFO Application started
[14:30:45.124] WARN Low memory detected
[14:30:45.125] ERROR Critical failure occurred
[14:30:45.126] DEBUG Debugging internal state
[14:30:45.125] FATAL App closed unsuccessfuly
In DEBUG builds, the logger includes the call stack for non-ERROR/WARN logs:
[14:30:45.126] DEBUG Debugging internal state
Call stack: at NeoSimpleLogger.Logger.Debug(String message)
at MyApplication.Main(String[] args)
- Color Support: Requires a terminal or console that supports ANSI escape codes.
- Performance: Minimal overhead due to simple formatting and no external dependencies.
- License: BSD-3 Clause License (see
LICENSEfile).
Add the NeoSimpleLogger namespace to your project. No external packages required.
[BSD-3 Clause License] © 2025 Ruzen42
Pull requests and issues are welcome!
- Report bugs: GitHub Issues
- Feature requests: GitHub Discussions