mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-20 23:02:33 -04:00
Logging Enhancements (#285)
* If the user is on Debug, allow logging DB params to the logger. Implemented the ability to change logger from UI and to keep the DB settings of LogLevel and Port in sync with appsettings. * Exclude a lot more clutter from hitting Sentry * Removed github action * Small cleanup
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using API.Data;
|
||||
using System;
|
||||
using API.Data;
|
||||
using API.Helpers;
|
||||
using API.Interfaces;
|
||||
using API.Interfaces.Services;
|
||||
using API.Services;
|
||||
using API.Services.Tasks;
|
||||
using Kavita.Common;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -29,12 +31,12 @@ namespace API.Extensions
|
||||
services.AddScoped<IBackupService, BackupService>();
|
||||
services.AddScoped<ICleanupService, CleanupService>();
|
||||
services.AddScoped<IBookService, BookService>();
|
||||
|
||||
|
||||
|
||||
services.AddDbContext<DataContext>(options =>
|
||||
{
|
||||
options.UseSqlite(config.GetConnectionString("DefaultConnection"));
|
||||
options.EnableSensitiveDataLogging(env.IsDevelopment());
|
||||
options.EnableSensitiveDataLogging(env.IsDevelopment() || Configuration.GetLogLevel(Program.GetAppSettingFilename()).Equals("Debug"));
|
||||
});
|
||||
|
||||
services.AddLogging(loggingBuilder =>
|
||||
|
||||
Reference in New Issue
Block a user