AB4227 - Moved Logging

This commit is contained in:
Bjarke Berg
2019-12-18 12:27:14 +01:00
parent 897cb63ad6
commit 38519b2bab
38 changed files with 63 additions and 54 deletions

View 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();
}
}

View File

@@ -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" />

View File

@@ -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;