Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NLog/NLog.Extensions.Logging
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d2f45532cc4713e759dd7d478f23c5900cd90aa9
Choose a base ref
..
head repository: NLog/NLog.Extensions.Logging
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 896492451770ba4956c6059ce821b730f12ae641
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/NLog.Extensions.Configuration/ConfigSettingLayoutRenderer.cs
Original file line number Diff line number Diff line change
@@ -134,8 +134,8 @@ private IConfigurationRoot LoadFileConfiguration(string fileNames)

private static bool IsDefaultConfiguration(Layout fileName, string defaultFileName)
{
var simpleLayout = fileName as SimpleLayout;
return simpleLayout == null || string.IsNullOrEmpty(simpleLayout.Text) || ReferenceEquals(simpleLayout.Text, defaultFileName);
var layoutFileName = (fileName as SimpleLayout)?.Text;
return string.IsNullOrEmpty(layoutFileName) || ReferenceEquals(layoutFileName, defaultFileName);
}

private static IConfigurationRoot BuildConfigurationRoot(string fileNames, bool includeEnvironmentVariables)