VersaTul.Logger.File
1.0.25
Prefix Reserved
See the version list below for details.
dotnet add package VersaTul.Logger.File --version 1.0.25
NuGet\Install-Package VersaTul.Logger.File -Version 1.0.25
<PackageReference Include="VersaTul.Logger.File" Version="1.0.25" />
paket add VersaTul.Logger.File --version 1.0.25
#r "nuget: VersaTul.Logger.File, 1.0.25"
// Install VersaTul.Logger.File as a Cake Addin #addin nuget:?package=VersaTul.Logger.File&version=1.0.25 // Install VersaTul.Logger.File as a Cake Tool #tool nuget:?package=VersaTul.Logger.File&version=1.0.25
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.12)
- VersaTul.Handler.File (>= 1.0.17)
- VersaTul.Logger (>= 1.0.8)
- VersaTul.Utilities (>= 1.0.10)
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 | 120 | 4/5/2024 |
1.0.27 | 109 | 4/4/2024 |
1.0.26 | 109 | 4/4/2024 |
1.0.25 | 122 | 3/1/2024 |
1.0.24 | 117 | 2/2/2024 |
1.0.23 | 106 | 2/1/2024 |
1.0.22 | 107 | 1/25/2024 |
1.0.21 | 104 | 1/23/2024 |
1.0.20 | 97 | 1/23/2024 |
1.0.19 | 107 | 1/15/2024 |
1.0.18 | 118 | 1/11/2024 |
1.0.17 | 145 | 1/11/2024 |
1.0.16 | 107 | 1/11/2024 |
1.0.15 | 106 | 12/16/2023 |
1.0.14 | 181 | 11/2/2023 |
1.0.13 | 161 | 7/22/2023 |