Class LoggingConfig
- Namespace
- MonkeyLoader.Logging
- Assembly
- MonkeyLoader.dll
public sealed class LoggingConfig : ConfigSection, INestedIdentifiable<Config>, INestedIdentifiable, IIdentifiableOwner<ConfigSection, IDefiningConfigKey>, IIdentifiableOwner<IDefiningConfigKey>, IIdentifiable, IPrioritizable
- Inheritance
-
LoggingConfig
- Implements
- Inherited Members
- Extension Methods
Constructors
LoggingConfig()
public LoggingConfig()
Fields
DirectoryPathKey
public readonly DefiningConfigKey<string?> DirectoryPathKey
Field Value
FileExtension
public const string FileExtension = ".log"
Field Value
FileNamePrefix
public const string FileNamePrefix = "MonkeyLog_"
Field Value
FileSearchPattern
public const string FileSearchPattern = "*.log"
Field Value
FilesToPreserveKey
public readonly DefiningConfigKey<int> FilesToPreserveKey
Field Value
LevelKey
public readonly DefiningConfigKey<LoggingLevel> LevelKey
Field Value
ShouldLogToConsoleKey
public readonly DefiningConfigKey<bool> ShouldLogToConsoleKey
Field Value
TimestampFormat
public const string TimestampFormat = "yyyy-MM-ddTHH-mm-ss"
Field Value
Properties
Controller
Gets the LoggingController used by the loader that owns this config and everything loaded by it.
public LoggingController Controller { get; }
Property Value
CurrentLogFilePath
public string? CurrentLogFilePath { get; }
Property Value
Description
Gets a description of the config items found in this section.
public override string Description { get; }
Property Value
DirectoryPath
public string? DirectoryPath { get; }
Property Value
FilesToPreserve
public int FilesToPreserve { get; }
Property Value
Id
Gets the mod-unique identifier of this section.
public override string Id { get; }
Property Value
Priority
Gets the priority of this item. Use an agreed standard as a base.
public override int Priority { get; }
Property Value
- int
An interger used to sort the prioritizable items.
Higher comes first with the default comparer.
Remarks
Controls in which order the sections of a Config are listed.
ShouldCleanLogDirectory
public bool ShouldCleanLogDirectory { get; }
Property Value
ShouldLogToConsole
public bool ShouldLogToConsole { get; }
Property Value
ShouldWriteLogFile
public bool ShouldWriteLogFile { get; }
Property Value
Version
Gets the semantic version for this config section.
This is used to check if the defined and saved configs are compatible.
public override Version Version { get; }
Property Value
Methods
TryGetTimestamp(string, out DateTime?)
public static bool TryGetTimestamp(string logFile, out DateTime? timestamp)