From ed1fd4a2e8143b0213b2630ab6834fe207fbd213 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Mon, 28 Sep 2015 01:45:47 +0100 Subject: [PATCH] Lazy eval requestIdentifier Until is moved to httpContext? --- src/Microsoft.AspNet.Hosting/Internal/HostingEngine.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Hosting/Internal/HostingEngine.cs b/src/Microsoft.AspNet.Hosting/Internal/HostingEngine.cs index 3bdf2ade61..556103b78a 100644 --- a/src/Microsoft.AspNet.Hosting/Internal/HostingEngine.cs +++ b/src/Microsoft.AspNet.Hosting/Internal/HostingEngine.cs @@ -95,7 +95,6 @@ namespace Microsoft.AspNet.Hosting.Internal { var httpContext = contextFactory.CreateHttpContext(features); httpContext.ApplicationServices = _applicationServices; - var requestIdentifier = GetRequestIdentifier(httpContext); if (telemetrySource.IsEnabled("Microsoft.AspNet.Hosting.BeginRequest")) { @@ -110,7 +109,7 @@ namespace Microsoft.AspNet.Hosting.Internal logger.IsEnabled(LogLevel.Information) || logger.IsEnabled(LogLevel.Verbose) || logger.IsEnabled(LogLevel.Debug) - ? logger.BeginScope("Request Id: {RequestId}", requestIdentifier) + ? logger.BeginScope("Request Id: {RequestId}", GetRequestIdentifier(httpContext)) : null) { contextAccessor.HttpContext = httpContext;