fix: 首次启动无法创建日志文件夹;Config 使用了错误的锁
This commit is contained in:
1 parent
473ac94d63
commit
d3b9ccde9c
2 files changed
+9
-7
No files matched your search
@@ -323,7 +323,9 @@ public class FileLogger : BaseLogger, IDisposable {
|
||||
Logger.Warn(ex, "整理日志文件失败");
|
||||
}
|
||||
// 新建 writer
|
||||
writer = new StreamWriter(PathUtils.ForApi(Path.Combine(logFolder, $"{fileNamePrefix}1{fileNameSuffix}")), append: true) { AutoFlush = true };
|
||||
string logFilePath = PathUtils.ForApi(Path.Combine(logFolder, $"{fileNamePrefix}1{fileNameSuffix}"));
|
||||
DirectoryUtils.Create(logFolder);
|
||||
writer = new StreamWriter(logFilePath, append: true) { AutoFlush = true };
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
Reference in new issue
Block a user