Skip to content

Logging File

Daniel edited this page Aug 12, 2020 · 7 revisions

CodeMonkeys.Logging.File

Nuget

The CodeMonkeys.Logging.File package contains the implementation to write log messages to a local file.

Options

Name Type Description Default value Remarks
FileNamePrefix string The file name prefix used when creating log files. log-DateTime.Now.ToShortDateString
Extension string The file extension of the log files. txt
MaxFileSize int? The max size of a log file in bytes. null - no limit
MaxFilesToRetain int? The maximum retained file count. null - no limit
Directory string The path to the directory where the log files should be stored string.Empty Must be set by the user before using the file logger.

How to set a option property

FileLogService.Options.Extension = "log";
Clone this wiki locally