Aether Utilities Aether Utilities
Aether Utilities Aether Utilities
DocFX + Singulink = ♥

Search Results for

    Edit this page

    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
    object
    LogOptions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Extension Methods
    TypeExtensions.CanSerializeJson<T>(T)
    TypeExtensions.CanSerializeXml<T>(T)
    TypeExtensions.SerializeJson<T>(T)
    TypeExtensions.SerializeXml<T>(T)

    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

    string

    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

    bool

    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

    bool

    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

    string

    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

    string

    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

    string

    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

    string

    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

    bool

    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; }

    Property Value

    bool
    (c) 2024 Ethan Hann. All rights reserved.