@@ -87,7 +87,14 @@ internal static class Config
87
87
public static string PreferredFontFamily => config . GetValue ( nameof ( PreferredFontFamily ) , "" ) ;
88
88
public static string LogPath => config . GetValue ( nameof ( LogPath ) , "./logs/" ) ; // paths are relative to the working directory
89
89
public static string IrdCachePath => config . GetValue ( nameof ( IrdCachePath ) , "./ird/" ) ;
90
- public static string RedumpDatfileCachePath => config . GetValue ( nameof ( RedumpDatfileCachePath ) , "./datfile/" ) ;
90
+ public static string BotAppDataFolder => config . GetValue (
91
+ nameof ( BotAppDataFolder ) ,
92
+ Path . Combine (
93
+ Environment . GetFolderPath ( Environment . SpecialFolder . LocalApplicationData ) ,
94
+ "compat-bot"
95
+ )
96
+ ) ;
97
+ public static string RedumpDatfileCachePath => Path . Combine ( BotAppDataFolder , "compat-bot" , "datfile" ) ;
91
98
public static string RenameNameSuffix => config . GetValue ( nameof ( RenameNameSuffix ) , " (Rule 7)" ) ;
92
99
public static string OcrBackend => config . GetValue ( nameof ( OcrBackend ) , "auto" ) ; // possible values: auto, tesseract, florence2, azure
93
100
@@ -248,6 +255,7 @@ private static ILogger GetLog()
248
255
var fileTarget = new FileTarget ( "logfile" ) {
249
256
FileName = CurrentLogPath ,
250
257
ArchiveEvery = FileArchivePeriod . Day ,
258
+ MaxArchiveDays = 30 ,
251
259
//ArchiveSuffixFormat = ".{1:yyyyMMdd}.{0:00}",
252
260
ArchiveNumbering = ArchiveNumberingMode . DateAndSequence ,
253
261
ConcurrentWrites = false ,
@@ -334,4 +342,4 @@ public static async Task GetCurrentGitRevisionAsync(CancellationToken cancellati
334
342
var branch = await GitRunner . Exec ( "rev-parse --abbrev-ref HEAD" , cancellationToken ) ;
335
343
GitRevision = $ "{ commit } on { branch } ";
336
344
}
337
- }
345
+ }
0 commit comments