LoggerX 1.0.1
dotnet add package LoggerX --version 1.0.1
NuGet\Install-Package LoggerX -Version 1.0.1
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="LoggerX" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LoggerX --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LoggerX, 1.0.1"
#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.
// Install LoggerX as a Cake Addin #addin nuget:?package=LoggerX&version=1.0.1 // Install LoggerX as a Cake Tool #tool nuget:?package=LoggerX&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LoggerX
The best .NET console logger.
LoggerX is a simple yet complex console logger for .NET Framework & .NET core applications.
Features
- Info, Suggestion, Warning, Error, Fatal, & Custom logging types.
- Supports logging to a preset & custom folder.
Installation
LoggerX requires .NET 5.0 or higher to run.
How to Use
Optional Log File Initialization Function
// If you do not want the logs file to output into the default Logs folder, then run the following function before saving the logs to a file. If this function is not run before saving to a file, the output log will go into the default Logs folder located in your application's folder.
// 1st Parameter: Sets the output folder for the logs.
LoggerX.SetLogOutput(@"C:\LoggerX\");
Optional Log Save Function
// Saves the included logs into one file.
LoggerX.SaveLogsToFile();
Log Types
// Info
// Logs a message to the console.
// 1st Parameter: The text you would like to be displayed.
// 2nd Optional Parameter: Whether this log will be included in the log file.
LoggerX.Info("text", true);
// Suggestion
// Logs a message to the console.
// 1st Parameter: The text you would like to be displayed.
// 2nd Optional Parameter: Whether this log will be included in the log file.
LoggerX.Suggest("text", true);
// Warn
// Logs a message to the console.
// 1st Parameter: The text you would like to be displayed.
// 2nd Optional Parameter: Whether this log will be included in the log file.
LoggerX.Warn("text", true);
// Error
// Logs a message to the console.
// 1st Parameter: The text you would like to be displayed.
// 2nd Optional Parameter: Whether this log will be included in the log file.
// 3nd Optional Parameter: Whether the application is closed after the log is ran.
LoggerX.Error("text", true, false);
// Fatal
// Logs a message to the console.
// 1st Parameter: The text you would like to be displayed.
// 2nd Optional Parameter: Whether this log will be included in the log file.
// 3nd Optional Parameter: Whether the application is closed after the log is ran.
LoggerX.Fatal("text", true, false);
// Custom
// Logs a message to the console.
// 1st Parameter: The text you would like to be displayed.
// 2nd Parameter: The prefix of the log.
// 3rd Optional Parameter: The color of the log message.
// 4nd Optional Parameter: Whether this log will be included in the log file.
// 5nd Optional Parameter: Whether the application is closed after the log is ran.
LoggerX.Custom("text", "Custom", ConsoleColor.Red, true, false);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.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.
Deprecated the Initialize() function and added the SetLogOutput() function.