VersaTul.Logger.File
1.0.28
Prefix Reserved
dotnet add package VersaTul.Logger.File --version 1.0.28
NuGet\Install-Package VersaTul.Logger.File -Version 1.0.28
<PackageReference Include="VersaTul.Logger.File" Version="1.0.28" />
paket add VersaTul.Logger.File --version 1.0.28
#r "nuget: VersaTul.Logger.File, 1.0.28"
// Install VersaTul.Logger.File as a Cake Addin #addin nuget:?package=VersaTul.Logger.File&version=1.0.28 // Install VersaTul.Logger.File as a Cake Tool #tool nuget:?package=VersaTul.Logger.File&version=1.0.28
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. |
-
net8.0
- VersaTul.Configurations (>= 1.0.15)
- VersaTul.Handler.File (>= 1.0.17)
- VersaTul.Logger (>= 1.0.8)
- VersaTul.Utilities (>= 1.0.13)
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.28 | 118 | 4/5/2024 |
1.0.27 | 107 | 4/4/2024 |
1.0.26 | 107 | 4/4/2024 |
1.0.25 | 120 | 3/1/2024 |
1.0.24 | 115 | 2/2/2024 |
1.0.23 | 104 | 2/1/2024 |
1.0.22 | 105 | 1/25/2024 |
1.0.21 | 102 | 1/23/2024 |
1.0.20 | 95 | 1/23/2024 |
1.0.19 | 105 | 1/15/2024 |
1.0.18 | 116 | 1/11/2024 |
1.0.17 | 143 | 1/11/2024 |
1.0.16 | 105 | 1/11/2024 |
1.0.15 | 104 | 12/16/2023 |
1.0.14 | 179 | 11/2/2023 |
1.0.13 | 159 | 7/22/2023 |