serilog-contrib / serilog-sinks-splunk

A Serilog sink that writes to Splunk
https://splunk.com
Apache License 2.0
46 stars 47 forks source link

AuditTo sink #109

Closed joacar closed 3 years ago

joacar commented 5 years ago

When using the AuditTo the events should be written immediately and not batched. Since the splunk sink is based on PeriodicBatchingSink the events are batched according to parameters that defines batch count and interval. For now I've downloaded the code for the sink implementation and call it directly in my abstraction, so this isn't a stopping one.

This should perhaps be in the serilog-sinks-periodbatching since the behavior from AuditTo should be propagated down the the sink implementation.

Behind the scene something like SinkEmitBehavior could be introduced as passed a strategy to concerned parts to allow for honoring the desired functionality for AuditTo contract.

Edit I looked how it was done for mssql a certain sink is created for this. But the behavior for auditing spreads in different parts as well, for example PropertyValueConverter (#800), so to refactor this parts make sense.

merbla commented 3 years ago

Closing as a part of larger Serilog contrib reorg

Checkout https://github.com/serilog/serilog/issues/1627