The Free Software Media System - Server Backend & API
Use default ASP.NET Core logger factory for DbContext factory
Patrick Barronf3e5139cfc05
diff --git a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.csindex de64911b42..bb8d4dd14f 100644--- a/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs+++ b/Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs@@ -4,7 +4,6 @@ using EFCoreSecondLevelCacheInterceptor;using MediaBrowser.Common.Configuration;using Microsoft.EntityFrameworkCore;using Microsoft.Extensions.DependencyInjection;-using Microsoft.Extensions.Logging;namespace Jellyfin.Server.Implementations.Extensions;@@ -32,10 +31,8 @@ public static class ServiceCollectionExtensionsserviceCollection.AddPooledDbContextFactory<JellyfinDbContext>((serviceProvider, opt) =>{var applicationPaths = serviceProvider.GetRequiredService<IApplicationPaths>();- var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();opt.UseSqlite($"Filename={Path.Combine(applicationPaths.DataPath, "jellyfin.db")}")- .AddInterceptors(serviceProvider.GetRequiredService<SecondLevelCacheInterceptor>())- .UseLoggerFactory(loggerFactory);+ .AddInterceptors(serviceProvider.GetRequiredService<SecondLevelCacheInterceptor>());});return serviceCollection;