fix: save log with PathBuilder

This commit is contained in:
Polianin Nikita 2024-08-10 22:04:11 +03:00
parent 837205f66e
commit c7b401eae7

View File

@ -28,7 +28,9 @@ public static class LoggerConfiguration
if (generalConfig?.EnableLogToFile == true)
{
if (!string.IsNullOrEmpty(generalConfig.LogFilePath) && Directory.Exists(PathBuilder.Combine(generalConfig.LogFilePath)))
generalConfig.LogFilePath = PathBuilder.Combine(generalConfig.LogFilePath ?? string.Empty);
if (!string.IsNullOrEmpty(generalConfig.LogFilePath) && Directory.Exists(generalConfig.LogFilePath))
Directory.CreateDirectory(generalConfig.LogFilePath);
configuration.WriteTo.File(