Skip to content

Commit 554d294

Browse files
authored
NLogLoggingConfiguration - ToString includes AutoReload=true (#809)
1 parent add50bd commit 554d294

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/NLog.Extensions.Logging/Config/NLogLoggingConfiguration.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ private void MonitorForReload(IConfigurationSection nlogConfig)
122122
/// <inheritdoc />
123123
public override string ToString()
124124
{
125-
return base.ToString() + $" ConfigSection={_originalConfigSection?.Key}";
125+
if (_autoReload)
126+
return $"{base.ToString()}, AutoReload=true, ConfigSection={_originalConfigSection?.Key}";
127+
else
128+
return $"{base.ToString()}, ConfigSection={_originalConfigSection?.Key}";
126129
}
127130

128131
private sealed class LoggingConfigurationElement : ILoggingConfigurationElement
@@ -497,4 +500,4 @@ public void Dispose()
497500
}
498501
}
499502
}
500-
}
503+
}

0 commit comments

Comments
 (0)