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
Avoids making the already bloated config extensions method interface even more bloated (although levelSwitch is connected parameter restrictedToMinimumLevel which speaks for having levelSwitch next to it).
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -281,6 +281,9 @@ This setting is not used by the audit sink as it writes each event immediately a
281
281
A Flag to eagerly write a batch to the database containing the first received event regardless of `BatchPostingLimit` or `BatchPeriod`. It defaults to `true`.
282
282
This setting is not used by the audit sink as it writes each event immediately and not in a batched manner.
283
283
284
+
### LevelSwitch
285
+
286
+
A switch allowing the pass-through minimum level to be changed at runtime. If this is set, the parameter `restrictedToMinimumLevel` in the [sink configuration method](#sink-configuration) is ignored.
Copy file name to clipboardExpand all lines: src/Serilog.Sinks.MSSqlServer/Configuration/Extensions/Hybrid/LoggerConfigurationMSSqlServerExtensions.cs
+6-14Lines changed: 6 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -105,12 +105,11 @@ public static LoggerConfiguration MSSqlServer(
105
105
/// <param name="sinkOptions">Supplies additional settings for the sink</param>
106
106
/// <param name="sinkOptionsSection">A config section defining additional settings for the sink</param>
107
107
/// <param name="appConfiguration">Additional application-level configuration. Required if connectionString is a name.</param>
108
-
/// <param name="restrictedToMinimumLevel">The minimum level for events passed through the sink. Ignored when <paramref name="levelSwitch"/> is specified.</param>
108
+
/// <param name="restrictedToMinimumLevel">The minimum level for events passed through the sink. Ignored when LevelSwitch in <paramref name="sinkOptions"/> is specified.</param>
109
109
/// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
110
110
/// <param name="columnOptions">An externally-modified group of column settings</param>
111
111
/// <param name="columnOptionsSection">A config section defining various column settings</param>
112
112
/// <param name="logEventFormatter">Supplies custom formatter for the LogEvent column, or null</param>
113
-
/// <param name="levelSwitch">A switch allowing the pass-through minimum level to be changed at runtime.</param>
114
113
/// <returns>Logger configuration, allowing configuration to continue.</returns>
115
114
/// <exception cref="ArgumentNullException">A required parameter is null.</exception>
116
115
publicstaticLoggerConfigurationMSSqlServer(
@@ -123,15 +122,13 @@ public static LoggerConfiguration MSSqlServer(
@@ -230,12 +226,11 @@ public static LoggerConfiguration MSSqlServer(
230
226
/// <param name="sinkOptions">Supplies additional settings for the sink</param>
231
227
/// <param name="sinkOptionsSection">A config section defining additional settings for the sink</param>
232
228
/// <param name="appConfiguration">Additional application-level configuration. Required if connectionString is a name.</param>
233
-
/// <param name="restrictedToMinimumLevel">The minimum level for events passed through the sink. Ignored when <paramref name="levelSwitch"/> is specified.</param>
229
+
/// <param name="restrictedToMinimumLevel">The minimum level for events passed through the sink. Ignored when LevelSwitch in <paramref name="sinkOptions"/> is specified.</param>
234
230
/// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
235
231
/// <param name="columnOptions">An externally-modified group of column settings</param>
236
232
/// <param name="columnOptionsSection">A config section defining various column settings</param>
237
233
/// <param name="logEventFormatter">Supplies custom formatter for the LogEvent column, or null</param>
238
-
/// <param name="levelSwitch">A switch allowing the pass-through minimum level to be changed at runtime.</param>
239
234
/// <returns>Logger configuration, allowing configuration to continue.</returns>
240
235
/// <exception cref="ArgumentNullException">A required parameter is null.</exception>
241
236
publicstaticLoggerConfigurationMSSqlServer(
@@ -248,15 +243,13 @@ public static LoggerConfiguration MSSqlServer(
0 commit comments