VersaTul.Logger.File
1.0.29
Prefix Reserved
dotnet add package VersaTul.Logger.File --version 1.0.29
NuGet\Install-Package VersaTul.Logger.File -Version 1.0.29
<PackageReference Include="VersaTul.Logger.File" Version="1.0.29" />
paket add VersaTul.Logger.File --version 1.0.29
#r "nuget: VersaTul.Logger.File, 1.0.29"
// Install VersaTul.Logger.File as a Cake Addin #addin nuget:?package=VersaTul.Logger.File&version=1.0.29 // Install VersaTul.Logger.File as a Cake Tool #tool nuget:?package=VersaTul.Logger.File&version=1.0.29
VersaTul Logger File
This project provides the functionality needed to perform logging in a flat file. This project implements the ILogger interface from the VersaTul Logger project.
Features
- Log to a flat file source (e.g. text file)
- Archive log files when they reach a certain size
- Configure file name, file path, and max file size
Installation
To use this project, you need to have the VersaTul Logger project installed.
Then, you can install the VersaTul Logger File project by following these steps:
- Download the latest release.
- Extract the zip file to your preferred location.
- Add a reference to the VersaTul.Logger.File.dll file in your project.
Usage
To use this project, you need to create an instance of the FileLogger class and pass it an instance of the LogFileConfiguration class. For example:
using VersaTul.Logger;
using VersaTul.Logger.File;
// Create a log file configuration with the file name, file path, and max file size
LogFileConfiguration config = new LogFileConfiguration("log.txt", @"C:\Logs", 1024 * 1024);
// Create a file logger with the configuration
FileLogger logger = new FileLogger(config);
// Use the file logger as you would use any ILogger
logger.Log(LogLevel.Info, "This is a test message");
The FileLogger class implements the ILogger interface, so you can use any of the methods defined in the VersaTul Logger project. For more information, see the VersaTul Logger documentation.
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 | net8.0 is compatible. 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 is compatible. |
-
net8.0
- VersaTul.Configurations (>= 1.0.16)
- VersaTul.Handler.File (>= 1.0.19)
- VersaTul.Logger (>= 1.0.10)
- VersaTul.Utilities (>= 1.0.15)
-
net9.0
- VersaTul.Configurations (>= 1.0.16)
- VersaTul.Handler.File (>= 1.0.19)
- VersaTul.Logger (>= 1.0.10)
- VersaTul.Utilities (>= 1.0.15)
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.0.29 | 71 | 12/10/2024 |
1.0.28 | 123 | 4/5/2024 |
1.0.27 | 113 | 4/4/2024 |
1.0.26 | 113 | 4/4/2024 |
1.0.25 | 126 | 3/1/2024 |
1.0.24 | 121 | 2/2/2024 |
1.0.23 | 110 | 2/1/2024 |
1.0.22 | 111 | 1/25/2024 |
1.0.21 | 108 | 1/23/2024 |
1.0.20 | 101 | 1/23/2024 |
1.0.19 | 111 | 1/15/2024 |
1.0.18 | 122 | 1/11/2024 |
1.0.17 | 149 | 1/11/2024 |
1.0.16 | 111 | 1/11/2024 |
1.0.15 | 112 | 12/16/2023 |
1.0.14 | 185 | 11/2/2023 |
1.0.13 | 165 | 7/22/2023 |