OdiumDev 1.1.0

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

Title

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 Compatible and additional computed target framework versions.
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 Downloads Last Updated
1.1.0 397 2/27/2023
1.0.0 481 2/23/2023 1.0.0 is deprecated because it is no longer maintained.

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.