Table of Contents

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

DefiningConfigKey<string>

FileExtension

public const string FileExtension = ".log"

Field Value

string

FileNamePrefix

public const string FileNamePrefix = "MonkeyLog_"

Field Value

string

FileSearchPattern

public const string FileSearchPattern = "*.log"

Field Value

string

FilesToPreserveKey

public readonly DefiningConfigKey<int> FilesToPreserveKey

Field Value

DefiningConfigKey<int>

LevelKey

public readonly DefiningConfigKey<LoggingLevel> LevelKey

Field Value

DefiningConfigKey<LoggingLevel>

ShouldLogToConsoleKey

public readonly DefiningConfigKey<bool> ShouldLogToConsoleKey

Field Value

DefiningConfigKey<bool>

TimestampFormat

public const string TimestampFormat = "yyyy-MM-ddTHH-mm-ss"

Field Value

string

Properties

Controller

Gets the LoggingController used by the loader that owns this config and everything loaded by it.

public LoggingController Controller { get; }

Property Value

LoggingController

CurrentLogFilePath

public string? CurrentLogFilePath { get; }

Property Value

string

Description

Gets a description of the config items found in this section.

public override string Description { get; }

Property Value

string

DirectoryPath

public string? DirectoryPath { get; }

Property Value

string

FilesToPreserve

public int FilesToPreserve { get; }

Property Value

int

Id

Gets the mod-unique identifier of this section.

public override string Id { get; }

Property Value

string

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

bool

ShouldLogToConsole

public bool ShouldLogToConsole { get; }

Property Value

bool

ShouldWriteLogFile

public bool ShouldWriteLogFile { get; }

Property Value

bool

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

Version

Methods

TryGetTimestamp(string, out DateTime?)

public static bool TryGetTimestamp(string logFile, out DateTime? timestamp)

Parameters

logFile string
timestamp DateTime?

Returns

bool