Skip to content

Commit b25bada

Browse files
committed
refactor: 로그 삭제는 백그라운드에서 비동기로 실행해요
1 parent d9e324d commit b25bada

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

FocusTimer/App.xaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using System.IO;
1919
using System.Linq;
2020
using System.Text.RegularExpressions;
21+
using System.Threading.Tasks;
2122
using System.Windows;
2223
using FocusTimer.Data.DataContext;
2324
using FocusTimer.Features.Splash;
@@ -45,8 +46,8 @@ protected override void OnStartup(StartupEventArgs e)
4546
{
4647
base.OnStartup(e);
4748

48-
// log4net 초기화 전에 오래된 로그 파일 정리
49-
CleanupOldLogFiles();
49+
// 오래된 로그 파일을 백그라운드에서 비동기로 정리 (UI 블로킹 방지)
50+
_ = Task.Run(() => CleanupOldLogFiles());
5051

5152
Logger.Info("앱을 시작합니다.");
5253

0 commit comments

Comments
 (0)