Skip to content

Commit adb4e88

Browse files
committed
Remove unused method LoadXmlLoggingConfigurationFromPath
1 parent 9d837e5 commit adb4e88

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/NLog.Web.AspNetCore/AspNetExtensions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,6 @@ private static string ResolveEnvironmentNLogConfigFile(string basePath, string e
446446
return null;
447447
}
448448

449-
private static LoggingConfiguration LoadXmlLoggingConfigurationFromPath(string contentRootPath, string nlogConfigFileName, LogFactory logFactory)
450-
{
451-
var standardPath = System.IO.Path.Combine(contentRootPath, nlogConfigFileName);
452-
return System.IO.File.Exists(standardPath) ?
453-
new XmlLoggingConfiguration(standardPath, logFactory) : null;
454-
}
455-
456449
private static bool IsLoggingConfigurationLoaded(LoggingConfiguration cfg)
457450
{
458451
return cfg?.LoggingRules?.Count > 0 && cfg?.AllTargets?.Count > 0;

src/Shared/LayoutRenderers/AspNetResponseHasStartedLayoutRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected override void DoAppend(StringBuilder builder, LogEventInfo logEvent)
2020
var response = HttpContextAccessor.HttpContext.TryGetResponse();
2121
#if ASP_NET_CORE
2222
builder.Append(response?.HasStarted == true ? '1' : '0');
23-
#elif NET46
23+
#elif NET46_OR_GREATER
2424
builder.Append(response?.HeadersWritten == true ? '1' : '0');
2525
#endif
2626
}

0 commit comments

Comments
 (0)