NeoSimpleLogger 1.0.0
See the version list below for details.
dotnet add package NeoSimpleLogger --version 1.0.0
NuGet\Install-Package NeoSimpleLogger -Version 1.0.0
<PackageReference Include="NeoSimpleLogger" Version="1.0.0" />
<PackageVersion Include="NeoSimpleLogger" Version="1.0.0" />
<PackageReference Include="NeoSimpleLogger" />
paket add NeoSimpleLogger --version 1.0.0
#r "nuget: NeoSimpleLogger, 1.0.0"
#:package NeoSimpleLogger@1.0.0
#addin nuget:?package=NeoSimpleLogger&version=1.0.0
#tool nuget:?package=NeoSimpleLogger&version=1.0.0
π¦ NuGet Package Documentation: Logger
π Overview
NeoSimpleLogger
is a lightweight, cross-platform logging utility for .NET applications that provides color-coded console output with timestamped logs for different
severity levels: Error, Warn, Info, and Debug.
Key features:
- Colorful console logging for easy visual distinction.
- Timestamp included in every log entry.
- Conditional stack trace display in DEBUG mode for errors and warnings.
- Minimal dependencies (only standard .NET libraries).
π¦ Installation
Install the package via NuGet:
dotnet add package NeoSimpleLogger
Or via the NuGet Package Manager in Visual Studio.
π Usage
1. Log Messages
Use the static methods provided in the Logger
class to log messages:
Logger.Error("This is an error message.");
Logger.Warn("This is a warning message.");
Logger.Info("This is an informational message.");
Logger.Debug("This is a debug message.");
2. Example Output
When running the above code, the console output would look like this:
[14:30:45.123] ERROR This is an error message.
[14:30:45.124] WARN This is a warning message.
[14:30:45.125] INFO This is an informational message.
[14:30:45.126] DEBUG This is a debug message.
- Colors:
ERROR
β RedWARN
β YellowINFO
β GreenDEBUG
β MagentaTimestamp
β Dark Gray
π οΈ Conditional Debug Mode
In DEBUG mode, the logger will also display the stack trace for ERROR
and WARN
messages:
[14:30:45.123] ERROR This is an error message.
Call stack: ...
This is enabled via the #if DEBUG
preprocessor directive.
π License
This package is distributed under the GNU General Public License v3 (GPLv3).
License URL:
https://www.gnu.org/licenses/gpl-3.0.html
Important Notes:
- GPLv3 is a copyleft license, which requires that any derivative work must be distributed under the same license.
- If you distribute an application that uses this package, you must provide the source code of your project and this package (or a derivative of it).
- Use this license only if you are comfortable with the copyleft terms.
π¦ Compatibility
- Target Frameworks: .NET 8.0+
- Platforms: Windows, Linux, macOS (cross-platform)
π Example Project
For a full example, see the GitHub repository
π‘ Contact
If you have questions, suggestions, or want to report an issue, please contact the maintainer at:
- Email: malledeferlive@gmail.com
- GitHub: https://github.com/ruzen42/simple-logger
π¦ Package Version
- Current Version: 1.0.0
- NuGet Package ID:
NeoSimpleLogger
π Notes
- This package is not thread-safe. If used in multi-threaded applications, ensure proper synchronization.
- The logger uses Console.WriteLine, so it is best suited for console-based applications. For GUI or file-based logging, consider using a more advanced logging framework (e.g., Serilog, NLog).
π¦ Summary
| Feature | Description | | License | GPLv3 | | Platforms | Windows, Linux, macOS | | Log Levels | Error, Warn, Info, Debug | | Color Support | Yes | | Timestamp | Yes | | Stack Trace | Yes (in DEBUG mode) |
β Conclusion
Logger
is a simple, effective, and visually appealing logging utility for .NET developers. Itβs ideal for quick prototyping, debugging, or small to medium-sized
applications that need basic logging with color and timestamps.
π License File
The full GPLv3 license is included in the NuGet package as LICENSE.txt
. You can also view it at:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net9.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.