Closed SandstromErik closed 1 month ago
Hi @SandstromErik , Can you explain your problem a bit more? What is the reason for using PeriodicBatching Sink. As a reminder MSSqlServer sink supports batching by default.
I am having similar issues with version 7. I had to rollback to version 6 version 7 seems to remove PeriodicBatching
version 7 seems to remove PeriodicBatching
Yes, Serilog.Sinks.PeriodicBatching dependency removed from MsSqlServer package. It's now using native BatchingSink.
From Serilog.Sinks.PeriodicBatching repository:
Serilog 4.x and later versions support batching natively. New projects should use Serilog's IBatchedLogEventSink and WriteTo.Sink(IBatchedLogEventSink), not this package which is now only maintained for compatibility reasons.
version 7 seems to remove PeriodicBatching
Yes, Serilog.Sinks.PeriodicBatching dependency removed from MsSqlServer package. It's now using native BatchingSink.
From Serilog.Sinks.PeriodicBatching repository:
Serilog 4.x and later versions support batching natively. New projects should use Serilog's IBatchedLogEventSink and WriteTo.Sink(IBatchedLogEventSink), not this package which is now only maintained for compatibility reasons.
The current build of Serilog.Sinks.MSSqlServer 7.0.0 fails to launch properly when deployed in production for .NET 8 without including the Serilog.Sinks.PeriodicBatching repository. Something inside this build is still referencing that old library and thus requires the package to be manually added to ensure the application doesn't crash. This update to version 7 crashed multiple .NET 8 applications of mine for this reason. Can you please fix this?
@a-dam-berger you are probably facing the same issue as another user reported as #564. MSSQL sink 7.0.0 does not have any reference to Serilog.PeriodicBatching but somewhere in the prod environment some old Serilog assembly from a previous deployment was still lying around causing the problem. After the user cleaned this up, the problem was gone.
I tried to change version from 6.6.1 to 7.0.0 but now MSSqlServerSink can no longer be used in PeriodicBatchingSink constructor.
This is becasue IBatchedLogEventSink is ambiguous and has different namespaces in MSSqlServerSink and PeriodicBatchingSink.
I use the latest version of Serilog and Serilog.Sinks.PeriodicBatching so I can not upgrade those. Do I need to install another package?
.NET 8 OS: Windows 11