mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-13 11:02:18 -04:00
Implemented download log files (not in service). Refactored backupservice to handle log file splitting. Improved a few interfaces and added some unit tests around them.
This commit is contained in:
@@ -32,7 +32,10 @@ namespace API.Extensions
|
||||
|
||||
services.AddDbContext<DataContext>(options =>
|
||||
{
|
||||
options.UseSqlite(config.GetConnectionString("DefaultConnection"));
|
||||
options.UseSqlite(config.GetConnectionString("DefaultConnection"), builder =>
|
||||
{
|
||||
//builder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
|
||||
});
|
||||
});
|
||||
|
||||
services.AddLogging(loggingBuilder =>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace API.Extensions
|
||||
{
|
||||
public static class ConfigurationExtensions
|
||||
{
|
||||
public static int GetMaxRollingFiles(this IConfiguration config)
|
||||
{
|
||||
return int.Parse(config.GetSection("Logging").GetSection("File").GetSection("MaxRollingFiles").Value);
|
||||
}
|
||||
public static string GetLoggingFileName(this IConfiguration config)
|
||||
{
|
||||
return config.GetSection("Logging").GetSection("File").GetSection("Path").Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user