You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SelfLog.WriteLine("Warning: Both System.Configuration (app.config or web.config) and Microsoft.Extensions.Configuration are being applied to the MSSQLServer sink.");
SelfLog.WriteLine("Warning: Both System.Configuration (app.config or web.config) and Microsoft.Extensions.Configuration are being applied to the MSSQLServer sink.");
Copy file name to clipboardExpand all lines: src/Serilog.Sinks.MSSqlServer/Configuration/Extensions/System.Configuration/LoggerConfigurationMSSqlServerExtensions.cs
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ public static LoggerConfiguration MSSqlServer(
64
64
ColumnOptionscolumnOptions=null,
65
65
stringschemaName="dbo",
66
66
ITextFormatterlogEventFormatter=null)=>
67
-
loggerConfiguration.MSSqlServer(
67
+
loggerConfiguration.MSSqlServerInternal(
68
68
configSectionName:AppConfigSectionName,
69
69
connectionString,
70
70
tableName,
@@ -75,10 +75,11 @@ public static LoggerConfiguration MSSqlServer(
75
75
autoCreateSqlTable,
76
76
columnOptions,
77
77
schemaName,
78
-
logEventFormatter);
78
+
logEventFormatter,
79
+
newApplySystemConfiguration());
79
80
80
-
// Internal overload with parameter configSectionName used by tests to override the config section
81
-
internalstaticLoggerConfigurationMSSqlServer(
81
+
// Internal overload with parameters configSectionName and applySystemConfiguration used by tests to override the config section and inject mock
Copy file name to clipboardExpand all lines: src/Serilog.Sinks.MSSqlServer/Configuration/Implementations/Microsoft.Extensions.Configuration/ApplyMicrosoftExtensionsConfiguration.cs
Copy file name to clipboardExpand all lines: src/Serilog.Sinks.MSSqlServer/Configuration/Implementations/System.Configuration/ApplySystemConfiguration.cs
Copy file name to clipboardExpand all lines: test/Serilog.Sinks.MSSqlServer.Tests/Configuration/Extensions/System.Configuration/ConfigurationExtensionsTests.cs
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -45,11 +45,12 @@ public void CustomStandardColumnNames()
0 commit comments