diff --git a/src/OrchardCore/OrchardCore.Logging.NLog/TenantLayoutRenderer.cs b/src/OrchardCore/OrchardCore.Logging.NLog/TenantLayoutRenderer.cs index 53612618e04..1feb6e8edd3 100644 --- a/src/OrchardCore/OrchardCore.Logging.NLog/TenantLayoutRenderer.cs +++ b/src/OrchardCore/OrchardCore.Logging.NLog/TenantLayoutRenderer.cs @@ -1,8 +1,8 @@ -using System.Text; +using System.Text; using NLog; using NLog.LayoutRenderers; using NLog.Web.LayoutRenderers; -using OrchardCore.Environment.Shell; +using OrchardCore.Hosting.ShellBuilders; namespace OrchardCore.Logging { @@ -18,8 +18,8 @@ protected override void DoAppend(StringBuilder builder, LogEventInfo logEvent) { var context = HttpContextAccessor.HttpContext; - // If there is no ShellSettings in the Features then the log is rendered from the Host - var tenantName = context.Features.Get()?.Name ?? "None"; + // If there is no ShellContext in the Features then the log is rendered from the Host + var tenantName = context.Features.Get()?.Settings?.Name ?? "None"; builder.Append(tenantName); } }