MireaBackend/Endpoint/Configuration/Validation/Settings/LogSettings.cs

19 lines
602 B
C#
Raw Normal View History

2024-10-07 02:13:35 +03:00
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes;
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces;
2024-10-07 02:13:35 +03:00
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
[RequiredSettings]
public class LogSettings : IIsConfigured
{
public bool EnableLogToFile { get; set; }
public string? LogFilePath { get; set; }
public string? LogFileName { get; set; }
public bool IsConfigured()
{
return !EnableLogToFile ||
!string.IsNullOrEmpty(LogFilePath) &&
!string.IsNullOrEmpty(LogFileName);
}
}