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
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ All sink configuration methods accept the following arguments, though not necess
34
34
*`batchPostingLimit`
35
35
*`period`
36
36
*`formatProvider`
37
+
*`logEventFormatter`
37
38
38
39
### Basic Arguments
39
40
@@ -53,6 +54,8 @@ Consider increasing the batch size in high-volume logging environments. In one t
53
54
54
55
Refer to the Serilog Wiki's explanation of [Format Providers](https://github.com/serilog/serilog/wiki/Formatting-Output#format-providers) for details about the `formatProvider` arguments.
55
56
57
+
The parameter `logEventFormatter` can be used to specify a custom renderer implementing `ITextFormatter` which will be used to generate the contents of the `LogEvent`column. If the parameter is omitted or set to null, the default internal JSON formatter will be used. For more information about custom text formatters refer to the Serilog documentation [Custom text formatters](https://github.com/serilog/serilog/wiki/Formatting-Output#custom-text-formatters).
58
+
56
59
### Platform-Specific Arguments
57
60
58
61
These additional arguments are accepted when the sink is configured from a library or application that supports the .NET Standard-style _Microsoft.Extensions.Configuration_ packages. They are optional.
@@ -153,6 +156,7 @@ The constructor accepts most of the same arguments, and like other Serilog audit
153
156
*`autoCreateSqlTable`
154
157
*`columnOptions`
155
158
*`formatProvider`
159
+
*`logEventFormatter`
156
160
157
161
The `restrictedToMinimumLevel` parameter is not available because all events written to an audit sink are required to succeed.
158
162
@@ -407,6 +411,8 @@ This column stores log event property values as JSON. Typically you will use eit
407
411
408
412
The `ExcludeAddtionalProperties` and `ExcludeStandardColumns` properties are described in the [Custom Property Columns](#custom-property-columns) topic.
409
413
414
+
The content of this column is rendered as JSON by default or with a custom ITextFormatter passed by the caller as parameter `logEventFormatter`. Details can be found in [Sink Configuration Options](#sink-configuration-options).
415
+
410
416
## Custom Property Columns
411
417
412
418
By default, any log event properties you include in your log statements will be saved to the XML `Properties` column or the JSON `LogEvent` column. But they can also be stored in their own individual columns via the `AdditionalColumns` collection. This adds overhead to write operations but is very useful for frequently-queried properties. Only `ColumnName` is required; the default configuration is `varchar(max)`.
0 commit comments