OdiumDev 1.1.0
dotnet add package OdiumDev --version 1.1.0
NuGet\Install-Package OdiumDev -Version 1.1.0
<PackageReference Include="OdiumDev" Version="1.1.0" />
<PackageVersion Include="OdiumDev" Version="1.1.0" />
<PackageReference Include="OdiumDev" />
paket add OdiumDev --version 1.1.0
#r "nuget: OdiumDev, 1.1.0"
#:package OdiumDev@1.1.0
#addin nuget:?package=OdiumDev&version=1.1.0
#tool nuget:?package=OdiumDev&version=1.1.0

This is a simple logger library for C# applications. It provides a Logger class with two methods: Log() and SaveLogs().
Log<T>(string level, string moduleName, T message, [Optional] Exception errorException) Function
The Log<T>() method allows you to log messages with different levels of severity, along with the name of the module where the message originated. Here's an example of how to use it:
Logger.Log("error", "MyModule", "This is an error message");
Logger.Log("error", "MyModule", "This is an error message with an exception object", exception);
The first parameter is the severity level ("error"). The second parameter is the name of the module where the message originated. The third parameter is the message itself and the optional fourth parameter is the exception object.
The messages are logged to a file called log.txt in the current directory.
If the severity level is "error", the method also creates a crash dump file with the current date and time as the filename, and writes the stack trace and error information to it.
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net481 is compatible. |
This package has 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.
Version 1.1
- Modified Log() void for extra manipulation and flexibility
- Changed SaveLogs from void to a bool so it can be used in a more efficient way in functions.