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

Property-rendering delegates

Open MV10 opened this issue 7 years ago • 1 comments

For supporting the more complex SQL column types (image or varbinary, for example) in specialized logging scenarios, I've been considering a callback mechanism for rendering property values.

The only drawback that comes to mind is that log properties aren't rendered until the batch is written. This deferred rendering could be addressed by writing an application-specific identifier with the log event which is passed to the rendering delegate.

The implementation appears relatively simple, but I'm not going to tag this as a feature request yet. I'd like to hear if anyone has thoughts about this idea.

MV10 avatar Oct 12 '18 09:10 MV10

Sounds very interesting.

Do I understand this right, that the application specific id is used to find the matching delegate when a property is rendered? If the rendering delegate could be set in ColumnOptions.AdditionalColumns for each property, could we then do without an application-specific id?

ckadluba avatar Jul 29 '20 14:07 ckadluba