serilog-sinks-mssqlserver
serilog-sinks-mssqlserver copied to clipboard
Storing nested object property in separate column
I am able to populate additional columns with properties directly available under LogEvent->Properties
If i have a nested object model within LogEvent, such as LogEvent.Properties.Customer with Customer having different properties such as FirstName, LastName etc. Is it possible to configure additional columns such as LogEvent.Properties.Customer.FirstName goes into a separate column in the configured sql server table.
I want to be able to configure something like this,
"additionalColumns": [
{
"ColumnName": "FirstName", //This should get populated from Properties.Customer.FirstName
"DataType": "varchar",
"AllowNull": true,
"DataLength": 500
}
]