LANCommander/LANCommander.Server.Settings/Models/LoggingProvider.cs
Pat Hartl add770b227 Refactor Settings
Settings for the server are now combined with the settings from the SDK. This introduces a large breaking change and a migration should be created. This refactor utilizes .NET Configuration and the Options pattern. This will allow for the overriding of any setting using envionment variables. It also means that Settings.yml can be used to override any .NET configuration. A SettingsProvider implementation was created, and any updating of settings was changed from SettingsService.SaveSettings() to SettingsProvider.Update(s => { ... })
2025-11-16 12:31:25 -06:00

15 lines
No EOL
561 B
C#

using LANCommander.Server.Settings.Enums;
using Microsoft.Extensions.Logging;
namespace LANCommander.Server.Settings.Models;
public class LoggingProvider
{
public string Name { get; set; }
public LogLevel MinimumLevel { get; set; } = LogLevel.Information;
public bool Enabled { get; set; } = true;
public LoggingProviderType Type { get; set; } = LoggingProviderType.Console;
public LogInterval? ArchiveEvery { get; set; }
public int MaxArchiveFiles { get; set; } = 10;
public string ConnectionString { get; set; } = String.Empty;
}