LoggerVision 1.0.1
dotnet add package LoggerVision --version 1.0.1
NuGet\Install-Package LoggerVision -Version 1.0.1
<PackageReference Include="LoggerVision" Version="1.0.1" />
<PackageVersion Include="LoggerVision" Version="1.0.1" />
<PackageReference Include="LoggerVision" />
paket add LoggerVision --version 1.0.1
#r "nuget: LoggerVision, 1.0.1"
#:package LoggerVision@1.0.1
#addin nuget:?package=LoggerVision&version=1.0.1
#tool nuget:?package=LoggerVision&version=1.0.1
Logging Setup and Usage with LoggerVision Overview This README provides instructions on how to set up and use logging in your C# application using the LoggerVision library. LoggerVision allows you to log messages to files with configurable settings such as file name, directory path, log retention period, and more.
Installation Install LoggerVision:
Include the LoggerVision library in your C# project. If using NuGet, install it via Package Manager Console: mathematica Copy code Install-Package LoggerVision Include the Namespace:
csharp Copy code using LoggerVision; Usage Example Here’s how you can initialize and use logging in your C# application:
csharp Copy code using LoggerVision;
public class ExampleController : ControllerBase { public ExampleController() { // Configure LoggerVision settings svLogger.Logger.AppPath = AppDomain.CurrentDomain.BaseDirectory; svLogger.Logger.EnableLogging = true; svLogger.Logger.FileName = "APIs"; svLogger.Logger.FileType = "UI"; svLogger.Logger.NoOfDaysToDeleteFile = 5;
// Write a log message
svLogger.Logger.WriteLog("Hello-----------");
}
} Explanation AppPath: Sets the base directory path where log files will be stored (AppDomain.CurrentDomain.BaseDirectory gets the current application domain's base directory). EnableLogging: Enables logging functionality (true in this case). FileName: Specifies the base name of the log file ("APIs" in this example). FileType: Specifies a type or category for the log file ("UI" in this case). NoOfDaysToDeleteFile: Specifies the number of days after which log files should be deleted (5 days in this example). WriteLog: Writes a log entry with the provided message ("Hello-----------" in this case). Generated Log File Based on the configuration, the log file generated would likely be named "APIs_UI_18_06_2024_0" (assuming the current date is June 18, 2024). This naming convention includes the base file name ("APIs"), followed by the type ("UI"), the date ("18_06_2024"), and possibly a sequence number or other identifier ("_0").
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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. net9.0 was computed. 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. |
-
net6.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.
1.0.1