Pls stop crashing

This commit is contained in:
Bond_009 2018-12-14 20:44:24 +01:00
parent b7ebb67cbb
commit 88f5471fe3
2 changed files with 7 additions and 7 deletions

View File

@ -405,7 +405,7 @@ namespace Emby.Server.Implementations
// hack alert, until common can target .net core
BaseExtensions.CryptographyProvider = CryptographyProvider;
XmlSerializer = new MyXmlSerializer(fileSystem, LoggerFactory.CreateLogger("XmlSerializer"));
XmlSerializer = new MyXmlSerializer(fileSystem, loggerFactory.CreateLogger("XmlSerializer"));
NetworkManager = networkManager;
networkManager.LocalSubnetsFn = GetConfiguredLocalSubnets;

View File

@ -53,12 +53,12 @@ namespace MediaBrowser.Server.Mono
var appPaths = CreateApplicationPaths(applicationPath, customProgramDataPath);
_appPaths = appPaths;
var logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.Console()
.CreateLogger();
using (var loggerFactory = new SerilogLoggerFactory(logger))
using (var loggerFactory = new SerilogLoggerFactory(
new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.Console()
.CreateLogger()
, true))
{
_loggerFactory = loggerFactory;