21 lines
		
	
	
		
			692 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			692 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Mirea.Api.Endpoint.Configuration.Validation.Attributes;
 | |
| using Mirea.Api.Endpoint.Configuration.Validation.Interfaces;
 | |
| 
 | |
| namespace Mirea.Api.Endpoint.Configuration.Model.GeneralSettings;
 | |
| 
 | |
| [RequiredSettings]
 | |
| public class LogSettings : IIsConfigured
 | |
| {
 | |
|     public bool EnableLogToFile { get; set; }
 | |
|     public string? LogFilePath { get; set; }
 | |
|     public string? LogFileName { get; set; }
 | |
|     public string? OpenTelemetryEndpoint { get; set; }
 | |
|     public string? OpenTelemetryServiceName { get; set; }
 | |
| 
 | |
|     public bool IsConfigured()
 | |
|     {
 | |
|         return !EnableLogToFile
 | |
|                 || !string.IsNullOrEmpty(LogFilePath)
 | |
|                 && !string.IsNullOrEmpty(LogFileName);
 | |
|     }
 | |
| } |