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
/// <summary>Sets Serilog as the logging provider.</summary>
37
+
/// <remarks>
38
+
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
39
+
/// The logger will be shut down when application services are disposed.
40
+
/// </remarks>
41
+
/// <param name="builder">The host builder to configure.</param>
42
+
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
43
+
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
44
+
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
45
+
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
46
+
/// <c>true</c> to write events to all providers.</param>
/// <summary>Sets Serilog as the logging provider.</summary>
59
+
/// <remarks>
60
+
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
61
+
/// The logger will be shut down when application services are disposed.
62
+
/// </remarks>
63
+
/// <param name="builder">The host builder to configure.</param>
64
+
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
65
+
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
66
+
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
67
+
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
68
+
/// <c>true</c> to write events to all providers.</param>
/// <summary>Sets Serilog as the logging provider.</summary>
81
+
/// <remarks>
82
+
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
83
+
/// The logger will be shut down when application services are disposed.
84
+
/// </remarks>
85
+
/// <param name="builder">The host builder to configure.</param>
86
+
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
87
+
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
88
+
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
89
+
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
90
+
/// <c>true</c> to write events to all providers.</param>
91
+
/// <remarks>If the static <see cref="Log.Logger"/> is a bootstrap logger (see
92
+
/// <c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
93
+
/// not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
Copy file name to clipboardExpand all lines: src/Cnblogs.Serilog.Extensions/SerilogLoggingBuilderExtensions.cs
+70-67Lines changed: 70 additions & 67 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,68 @@ public static ILoggingBuilder AddSerilog(
64
64
returnbuilder;
65
65
}
66
66
67
+
/// <summary>Sets Serilog as the logging provider.</summary>
68
+
/// <remarks>
69
+
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
70
+
/// The logger will be shut down when application services are disposed.
71
+
/// </remarks>
72
+
/// <param name="builder">The logging builder to configure.</param>
73
+
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
74
+
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
75
+
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
76
+
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
77
+
/// <c>true</c> to write events to all providers.</param>
/// <summary>Sets Serilog as the logging provider.</summary>
99
+
/// <remarks>
100
+
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
101
+
/// The logger will be shut down when application services are disposed.
102
+
/// </remarks>
103
+
/// <param name="builder">The logging builder to configure.</param>
104
+
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
105
+
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
106
+
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
107
+
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
108
+
/// <c>true</c> to write events to all providers.</param>
@@ -176,69 +242,6 @@ public static ILoggingBuilder AddSerilogFactory(
176
242
returnbuilder;
177
243
}
178
244
179
-
/// <summary>Sets Serilog as the logging provider.</summary>
180
-
/// <remarks>
181
-
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
182
-
/// The logger will be shut down when application services are disposed.
183
-
/// </remarks>
184
-
/// <param name="builder">The logging builder to configure.</param>
185
-
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
186
-
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
187
-
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
188
-
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
189
-
/// <c>true</c> to write events to all providers.</param>
/// <summary>Sets Serilog as the logging provider.</summary>
212
-
/// <remarks>
213
-
/// A <see cref="ILoggingBuilder"/> is supplied so that configuration and hosting information can be used.
214
-
/// The logger will be shut down when application services are disposed.
215
-
/// </remarks>
216
-
/// <param name="builder">The logging builder to configure.</param>
217
-
/// <param name="configureLogger">The delegate for configuring the <see cref="Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="Serilog.Core.Logger" />.</param>
218
-
/// <param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="Serilog.Log.Logger"/>.</param>
219
-
/// <param name="writeToProviders">By default, Serilog does not write events to <see cref="ILoggerProvider"/>s registered through
220
-
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
221
-
/// <c>true</c> to write events to all providers.</param>
0 commit comments