Class LogOptions
- Namespace
- AetherUtils.Core.Configuration
- Assembly
- AetherUtils.Core.dll
A DTO representing options for how log
files are handled and formatted for an application.
public sealed class LogOptions
- Inheritance
-
LogOptions
- Inherited Members
- Extension Methods
Properties
AppName
The name of the application doing the logging.
[Config("appName", "The name of the application doing the logging.", "MyApp")]
public string AppName { get; set; }
Property Value
IncludeDateOnly
Indicates if the log file name should include the date only, instead of the full formatted DateTime.
[Config("includeDateOnly", "Indicates if the log file name should include the date only, instead of the full formatted datetime.", true)]
public bool IncludeDateOnly { get; set; }
Property Value
IncludeDateTime
Indicates if the log file name should include the current formatted DateTime the file was created.
[Config("includeDateTime", "Indicates if the log file name should include the current formatted datetime the file was created.", false)]
public bool IncludeDateTime { get; set; }
Property Value
LogFileDirectory
The directory that the log file should be saved to.
[Config("logFileDirectory", "The directory that the log file should be saved to.", "%TEMP%\\logs")]
public string LogFileDirectory { get; set; }
Property Value
LogFooter
Specifies the footer to add at the end of each log file.
[Config("logFooter", "Specifies the footer to add at the end of each log file.", "")]
public string LogFooter { get; set; }
Property Value
LogHeader
Specifies the header to add at the top of each log file.
[Config("logHeader", "Specifies the header to add at the top of each log file.", "")]
public string LogHeader { get; set; }
Property Value
LogLayout
Specifies the default log layout to use for NLog.
[Config("logLayout", "Specifies the default log layout to use for NLog.", "${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true}")]
public string LogLayout { get; set; }
Property Value
NewFileEveryLaunch
Indicates whether a new log file should be created for every new launch of the application.
[Config("newFileEveryLaunch", "Indicates whether a new log file should be created for every new launch of the application.", false)]
public bool NewFileEveryLaunch { get; set; }
Property Value
WriteLogToConsole
Indicates whether the log should write to the system console in addition to a log file.
[Config("writeLogToConsole", "Indicates whether the log should write to the system console in addition to a log file.", true)]
public bool WriteLogToConsole { get; set; }