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:
parent
30352403cf
commit
bbb4240e20
22 changed files with 292 additions and 46 deletions
|
@ -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 =>
|
||||
|
|
16
API/Extensions/ConfigurationExtensions.cs
Normal file
16
API/Extensions/ConfigurationExtensions.cs
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue