VersaTul.Logger.File 1.0.26

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package VersaTul.Logger.File --version 1.0.26                
NuGet\Install-Package VersaTul.Logger.File -Version 1.0.26                
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="VersaTul.Logger.File" Version="1.0.26" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VersaTul.Logger.File --version 1.0.26                
#r "nuget: VersaTul.Logger.File, 1.0.26"                
#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 VersaTul.Logger.File as a Cake Addin
#addin nuget:?package=VersaTul.Logger.File&version=1.0.26

// Install VersaTul.Logger.File as a Cake Tool
#tool nuget:?package=VersaTul.Logger.File&version=1.0.26                

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:

  1. Download the latest release.
  2. Extract the zip file to your preferred location.
  3. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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