C# Класс NLog.Targets.FileTarget.DynamicFileArchive

Показать файл Открыть проект

Открытые методы

Метод Описание
DynamicFileArchive ( FileTarget fileTarget, int maxArchivedFiles ) : Common.System

Creates an instance of DynamicFileArchive class.

InitializeForArchiveFolderPath ( string archiveFolderPath ) : void

Adds the files in the specified path to the archive file queue.

Приватные методы

Метод Описание
AddToArchive ( string archiveFileName, string fileName, bool createDirectory ) : void

Archives the file, either by copying it to a new file system location or by compressing it, and add the file name into the list of archives.

Archive ( string archiveFileName, string fileName, bool createDirectory ) : bool
DeleteOldArchiveFiles ( ) : void

Remove old archive files when the files on the queue are more than the P:MaxArchiveFilesToKeep.

ExtractArchiveNumberFromFileName ( string archiveFileName ) : int
GetNextArchiveFileName ( string fileName ) : string

Gets the file name for the next archive file by appending a number to the provided "base"-filename. Example: Original Filename trace.log Target Filename trace.15.log

Описание методов

DynamicFileArchive() публичный Метод

Creates an instance of DynamicFileArchive class.
public DynamicFileArchive ( FileTarget fileTarget, int maxArchivedFiles ) : Common.System
fileTarget FileTarget The file target instance whose files to archive.
maxArchivedFiles int Maximum number of archive files to be kept.
Результат Common.System

InitializeForArchiveFolderPath() публичный Метод

Adds the files in the specified path to the archive file queue.
public InitializeForArchiveFolderPath ( string archiveFolderPath ) : void
archiveFolderPath string The folder where the archive files are stored.
Результат void