serilog-contrib / Serilog.Sinks.Postgresql.Alternative

Serilog.Sinks.Postgresql.Alternative is a library to save logging information from https://github.com/serilog/serilog to https://www.postgresql.org/.
MIT License
67 stars 13 forks source link

PropertiesColumnWriter: ability to exclude specified properties #8

Open SeppPenner opened 5 years ago

SeppPenner commented 5 years ago

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

SeppPenner commented 5 years ago

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

SeppPenner commented 5 years ago

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

Gaz83 commented 1 year ago

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"

2) 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.

lonix1 commented 1 week ago

+1 This feature is needed.

Specifically, it should be possible to exclude columns from LogEventSerializedColumnWriter.