serilog-mssql / serilog-sinks-mssqlserver

A Serilog sink that writes events to Microsoft SQL Server and Azure SQL
Apache License 2.0
283 stars 148 forks source link

Update to Serilog v4, remove reference to Serilog.Sinks.PeriodicBatching #543

Closed cremor closed 2 months ago

cremor commented 5 months ago

From the Serilog.Sinks.PeriodicBatching readme:

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.

Therefore I suggest to release a new major version of this sink which directly uses IBatchedLogEventSink from Serilog and doesn't have a reference to Serilog.Sinks.PeriodicBatching any more.

ckadluba commented 2 months ago

The PR was merged. Thank you very much for the contribution @cancakar35!

@cremor, @cancakar35 and everyone interested: now the dev branch was updated with the contribution a dev packages was built and published on nuget.org. Could you please give this version a spin and let me know if it works fine or you see any new issues with it?

https://www.nuget.org/packages/Serilog.Sinks.MSSqlServer/7.0.0-dev-00087

If the feedback on the dev package is good, I will merge dev into main and produce a latest release 7.0.0.

cremor commented 2 months ago

I've ran a quick test in my solution and everything seems to work fine. Thanks!

ckadluba commented 2 months ago

@cremor Thanks for testing with the prerelease.

elylv commented 1 month ago

This seems to have crept back in on 7.0.1, getting errors about missing PeriodicBatching on a deployed application that's been updated to this version.

cremor commented 1 month ago

@elylv See https://github.com/serilog-mssql/serilog-sinks-mssqlserver/issues/566#issuecomment-2356973725

cancakar35 commented 1 month ago

Hi @elylv , https://github.com/serilog-mssql/serilog-sinks-mssqlserver/issues/564#issuecomment-2351559452 this should help. Also if your project targets .net framework, please check your assembly bindings in web.config/app.config file.