AB4227 - Moved Logging
This commit is contained in:
13
src/Umbraco.Web/FrameworkMarchal.cs
Normal file
13
src/Umbraco.Web/FrameworkMarchal.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Umbraco.Core.Diagnostics;
|
||||
|
||||
namespace Umbraco.Web
|
||||
{
|
||||
|
||||
public class FrameworkMarchal : IMarchal
|
||||
{
|
||||
// This thing is not available in net standard, but exists in both .Net 4 and .Net Core 3
|
||||
public IntPtr GetExceptionPointers() => Marshal.GetExceptionPointers();
|
||||
}
|
||||
}
|
||||
@@ -170,6 +170,7 @@
|
||||
<Compile Include="Editors\MacrosController.cs" />
|
||||
<Compile Include="Editors\RelationTypeController.cs" />
|
||||
<Compile Include="Editors\TinyMceController.cs" />
|
||||
<Compile Include="FrameworkMarchal.cs" />
|
||||
<Compile Include="Hosting\AspNetHostingEnvironment.cs" />
|
||||
<Compile Include="HttpContextExtensions.cs" />
|
||||
<Compile Include="IUmbracoContextFactory.cs" />
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Umbraco.Web
|
||||
|
||||
_profiler = new LogProfiler(_logger);
|
||||
|
||||
_logger = SerilogLogger.CreateWithDefaultConfiguration(_hostingEnvironment, new AspNetSessionIdResolver(), () => _factory?.GetInstance<IRequestCache>());
|
||||
_logger = SerilogLogger.CreateWithDefaultConfiguration(_hostingEnvironment, new AspNetSessionIdResolver(), () => _factory?.GetInstance<IRequestCache>(), _configs.CoreDebug(), _ioHelper, new FrameworkMarchal());
|
||||
_backOfficeInfo = new AspNetBackOfficeInfo(_configs.Global(), _ioHelper, _configs.Settings(), _logger);
|
||||
|
||||
Umbraco.Composing.Current.Logger = _logger;
|
||||
|
||||
Reference in New Issue
Block a user