Register Serilog logging services correctly
This commit is contained in:
parent
1c1484389a
commit
c376f4ca51
|
@ -672,9 +672,8 @@ namespace Emby.Server.Implementations
|
||||||
|
|
||||||
serviceCollection.AddSingleton(JsonSerializer);
|
serviceCollection.AddSingleton(JsonSerializer);
|
||||||
|
|
||||||
serviceCollection.AddSingleton(LoggerFactory);
|
// TODO: Support for injecting ILogger should be deprecated in favour of ILogger<T> and this removed
|
||||||
serviceCollection.AddLogging();
|
serviceCollection.AddSingleton<ILogger>(_logger);
|
||||||
serviceCollection.AddSingleton(Logger);
|
|
||||||
|
|
||||||
serviceCollection.AddSingleton(FileSystemManager);
|
serviceCollection.AddSingleton(FileSystemManager);
|
||||||
serviceCollection.AddSingleton<TvDbClientManager>();
|
serviceCollection.AddSingleton<TvDbClientManager>();
|
||||||
|
|
|
@ -26,6 +26,7 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Logging.Abstractions;
|
using Microsoft.Extensions.Logging.Abstractions;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
using Serilog.Events;
|
||||||
using Serilog.Extensions.Logging;
|
using Serilog.Extensions.Logging;
|
||||||
using SQLitePCL;
|
using SQLitePCL;
|
||||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||||
|
@ -260,6 +261,7 @@ namespace Jellyfin.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.UseSerilog()
|
||||||
.UseContentRoot(appHost.ContentRoot)
|
.UseContentRoot(appHost.ContentRoot)
|
||||||
.ConfigureServices(services =>
|
.ConfigureServices(services =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user