serilog-sinks-mssqlserver icon indicating copy to clipboard operation
serilog-sinks-mssqlserver copied to clipboard

Storing nested object property in separate column

Open cvaishya opened this issue 6 years ago • 0 comments

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
                  }
                ]

cvaishya avatar Jul 01 '19 09:07 cvaishya