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
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,6 +216,13 @@ Log.Logger = new LoggerConfiguration()
216
216
.CreateLogger();
217
217
```
218
218
219
+
## Configuration with [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration)
220
+
221
+
Available since version 2.0.0
222
+
223
+
> [!TIP]
224
+
> The the message formatter, the exception formatter and the property filter can only be configured through code. Use the `Serilog.Settings.Configuration` integration only if you don't need them.
225
+
219
226
## Enrichers
220
227
221
228
The log4Net XML format defines some special attributes which are not included by default in Serilog events. They can be added by using the appropriate Serilog [enrichers](https://github.com/serilog/serilog/wiki/Enrichment).
/// Do not use this constructor. It is only available for the <a href="https://github.com/serilog/serilog-settings-configuration">Serilog.Settings.Configuration</a> integration.
18
+
/// The property filter, the message formatter and the exception formatter can only be configured through
19
+
/// the <see cref="Log4NetTextFormatter(Action<Log4NetTextFormatterOptionsBuilder>)"/> constructor.
20
+
/// </summary>
21
+
/// <remarks>
22
+
/// Binary compatibility across versions is not guaranteed. New optional parameters will be added in order to match new options.
23
+
/// </remarks>
24
+
[Obsolete("This constructor is only for use by the Serilog.Settings.Configuration package.",error:true)]
25
+
[SuppressMessage("ReSharper","UnusedMember.Global",Justification="Used by Serilog.Settings.Configuration through reflection.")]
26
+
publicLog4NetTextFormatter(
27
+
string?formatProvider=null,
28
+
CDataMode?cDataMode=null,
29
+
string?nullText=NullTextDefaultMarker,
30
+
// in order to support options.UseNullText(null) on .NET < 10, see https://learn.microsoft.com/en-us/dotnet/core/compatibility/extensions/10.0/configuration-null-values-preserved
/// A text formatter that serialize log events into <a href="https://logging.apache.org/log4net/">log4net</a> or <a href="https://logging.apache.org/log4j/">log4j</a> compatible XML format.
16
16
/// </summary>
17
-
// ReSharper disable once PartialTypeWithSinglePart -- Used for [GeneratedRegex] on .NET 8 onwards
0 commit comments