2024-10-07 02:25:36 +03:00
|
|
|
|
using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
|
|
|
|
|
using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
|
2024-05-28 06:38:24 +03:00
|
|
|
|
|
2024-10-07 02:25:36 +03:00
|
|
|
|
namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
|
2024-05-28 06:38:24 +03:00
|
|
|
|
|
|
|
|
|
[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);
|
|
|
|
|
}
|
|
|
|
|
}
|