fix: save log with PathBuilder
This commit is contained in:
parent
837205f66e
commit
c7b401eae7
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user