@@ -37,7 +37,7 @@ internal class MSSqlServerSinkTraits : IDisposable
37
37
public ColumnOptions ColumnOptions { get ; }
38
38
public IFormatProvider FormatProvider { get ; }
39
39
public ITextFormatter LogEventFormatter { get ; }
40
- public ISet < string > AdditionalColumnNames { get ; }
40
+ public ISet < string > AdditionalColumnPropertyNames { get ; }
41
41
public DataTable EventTable { get ; }
42
42
public ISet < string > StandardColumnNames { get ; }
43
43
@@ -82,10 +82,10 @@ internal MSSqlServerSinkTraits(
82
82
StandardColumnNames . Add ( col . ColumnName ) ;
83
83
}
84
84
85
- AdditionalColumnNames = new HashSet < string > ( StringComparer . OrdinalIgnoreCase ) ;
85
+ AdditionalColumnPropertyNames = new HashSet < string > ( StringComparer . OrdinalIgnoreCase ) ;
86
86
if ( ColumnOptions . AdditionalColumns != null )
87
87
foreach ( var col in ColumnOptions . AdditionalColumns )
88
- AdditionalColumnNames . Add ( col . ColumnName ) ;
88
+ AdditionalColumnPropertyNames . Add ( col . PropertyName ) ;
89
89
90
90
if ( ColumnOptions . Store . Contains ( StandardColumn . LogEvent ) )
91
91
LogEventFormatter = logEventFormatter ?? new JsonLogEventFormatter ( this ) ;
@@ -163,7 +163,7 @@ private string RenderLogEventColumn(LogEvent logEvent)
163
163
{
164
164
if ( ColumnOptions . LogEvent . ExcludeAdditionalProperties )
165
165
{
166
- var filteredProperties = logEvent . Properties . Where ( p => ! AdditionalColumnNames . Contains ( p . Key ) ) ;
166
+ var filteredProperties = logEvent . Properties . Where ( p => ! AdditionalColumnPropertyNames . Contains ( p . Key ) ) ;
167
167
logEvent = new LogEvent ( logEvent . Timestamp , logEvent . Level , logEvent . Exception , logEvent . MessageTemplate , filteredProperties . Select ( x => new LogEventProperty ( x . Key , x . Value ) ) ) ;
168
168
}
169
169
@@ -178,7 +178,7 @@ private string ConvertPropertiesToXmlStructure(IEnumerable<KeyValuePair<string,
178
178
var options = ColumnOptions . Properties ;
179
179
180
180
if ( options . ExcludeAdditionalProperties )
181
- properties = properties . Where ( p => ! AdditionalColumnNames . Contains ( p . Key ) ) ;
181
+ properties = properties . Where ( p => ! AdditionalColumnPropertyNames . Contains ( p . Key ) ) ;
182
182
183
183
if ( options . PropertiesFilter != null )
184
184
{
0 commit comments