Serilog.Sinks.Postgresql.Alternative icon indicating copy to clipboard operation
Serilog.Sinks.Postgresql.Alternative copied to clipboard

PropertiesColumnWriter: ability to exclude specified properties

Open SeppPenner opened this issue 6 years ago • 4 comments

See https://github.com/b00ted/serilog-sinks-postgresql/issues/21 and https://github.com/b00ted/serilog-sinks-postgresql/pull/22

SeppPenner avatar May 12 '19 19:05 SeppPenner

I still do not see the benefit: https://github.com/b00ted/serilog-sinks-postgresql/issues/21#issuecomment-491701131

SeppPenner avatar Jun 19 '19 08:06 SeppPenner

Will be closed until someone responds in https://github.com/b00ted/serilog-sinks-postgresql/issues/21

SeppPenner avatar Jun 27 '19 05:06 SeppPenner

Just stumbled upon this, this would be a great feature. We are currently having a look at switching over to Linux and using PostgreSQL. I have been using Serilog with the MS SQL sink and this has 2 nice features that I use.

1)If there is a column for a property then don't also store it in the properties column. This is controlled by a settings in the config so, which is off by default.

Example, If there is a property, say "RequestContent", and you create a column for this property then the property is removed from the properties column automatically, no need to write it twice.

Before Column Properties: "{ "Properties": [ "RequestContent": "blah blah blah", "ActionId": "SomeID" ]}" Column RequestContent: "blah blah blah"

After with auto property removed Column Properties: { "Properties": [ "ActionId": "SomeID" ]} Column RequestContent: "blah blah blah"

  1. Being able to specify which standard columns you want/don't want. I use this feature a lot and in one particular Table I actually don't use the LogEvent or Properties columns as I have created columns for the parts I care about. This make it more efficient for querying.

Hope this all makes sense.

Gaz83 avatar Mar 02 '23 15:03 Gaz83