Initialize ILoggerFactory in Current
This commit is contained in:
@@ -45,6 +45,7 @@ namespace Umbraco.Composing
|
||||
|
||||
public static void Initialize(
|
||||
ILogger<object> logger,
|
||||
ILoggerFactory loggerFactory,
|
||||
SecuritySettings securitySettings,
|
||||
GlobalSettings globalSettings,
|
||||
IIOHelper ioHelper,
|
||||
@@ -58,6 +59,7 @@ namespace Umbraco.Composing
|
||||
}
|
||||
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
_loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
|
||||
_ioHelper = ioHelper ?? throw new ArgumentNullException(nameof(ioHelper));
|
||||
_hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));
|
||||
_backOfficeInfo = backOfficeInfo ?? throw new ArgumentNullException(nameof(backOfficeInfo));
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using LightInject.Microsoft.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Composing;
|
||||
using Umbraco.Core.Composing.LightInject;
|
||||
@@ -87,7 +88,8 @@ namespace Umbraco.Core.Composing
|
||||
{
|
||||
// after cross wiring, configure "Current"
|
||||
Current.Initialize(
|
||||
_container.GetInstance<Microsoft.Extensions.Logging.ILogger<object>>(),
|
||||
_container.GetInstance<ILogger<object>>(),
|
||||
_container.GetInstance<ILoggerFactory>(),
|
||||
_container.GetInstance<IOptions<SecuritySettings>>().Value,
|
||||
_container.GetInstance<IOptions<GlobalSettings>>().Value,
|
||||
_container.GetInstance<IIOHelper>(),
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace Umbraco.Web
|
||||
var backOfficeInfo = new AspNetBackOfficeInfo(globalSettings, ioHelper, _loggerFactory.CreateLogger<AspNetBackOfficeInfo>(), Options.Create(webRoutingSettings));
|
||||
var profiler = GetWebProfiler(hostingEnvironment);
|
||||
Umbraco.Composing.Current.Initialize(logger,
|
||||
_loggerFactory,
|
||||
securitySettings,
|
||||
globalSettings,
|
||||
ioHelper, hostingEnvironment, backOfficeInfo, profiler);
|
||||
@@ -97,7 +98,7 @@ namespace Umbraco.Web
|
||||
return webProfiler;
|
||||
}
|
||||
|
||||
protected UmbracoApplicationBase(Microsoft.Extensions.Logging.ILogger<UmbracoApplicationBase> logger, SecuritySettings securitySettings, GlobalSettings globalSettings, ConnectionStrings connectionStrings, IIOHelper ioHelper, IProfiler profiler, IHostingEnvironment hostingEnvironment, IBackOfficeInfo backOfficeInfo)
|
||||
protected UmbracoApplicationBase(ILogger<UmbracoApplicationBase> logger, SecuritySettings securitySettings, GlobalSettings globalSettings, ConnectionStrings connectionStrings, IIOHelper ioHelper, IProfiler profiler, IHostingEnvironment hostingEnvironment, IBackOfficeInfo backOfficeInfo)
|
||||
{
|
||||
_securitySettings = securitySettings;
|
||||
_globalSettings = globalSettings;
|
||||
@@ -106,7 +107,7 @@ namespace Umbraco.Web
|
||||
if (!Umbraco.Composing.Current.IsInitialized)
|
||||
{
|
||||
Logger = logger;
|
||||
Umbraco.Composing.Current.Initialize(logger, securitySettings, globalSettings, ioHelper, hostingEnvironment, backOfficeInfo, profiler);
|
||||
Umbraco.Composing.Current.Initialize(logger, _loggerFactory, securitySettings, globalSettings, ioHelper, hostingEnvironment, backOfficeInfo, profiler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user