We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmitBatchAsync()
Howdy! :-)
Serilog now supports failure listeners natively, which among other things, allows failed batches to be rerouted to an alternative sink:
https://nblumhardt.com/2024/10/fallback-logging/
Unfortunately, this doesn't quite work with the PostgreSQL sink, because exceptions are suppressed after invoking the failureCallback.
failureCallback
https://github.com/serilog-contrib/Serilog.Sinks.Postgresql.Alternative/blob/master/src/Serilog.Sinks.Postgresql.Alternative/Sinks/PostgreSQL/PostgreSQLSink.cs#L54
I'd suggest deprecating failureCallback, and changing the implementation to:
catch (Exception ex) { this.sinkHelper.SinkOptions.FailureCallback?.Invoke(ex); throw; }
The Serilog infrastructure also handles SelfLog so this can be dropped.
SelfLog
Let me know if you'd like a PR along these lines. Cheers!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Howdy! :-)
Serilog now supports failure listeners natively, which among other things, allows failed batches to be rerouted to an alternative sink:
https://nblumhardt.com/2024/10/fallback-logging/
Unfortunately, this doesn't quite work with the PostgreSQL sink, because exceptions are suppressed after invoking the
failureCallback
.https://github.com/serilog-contrib/Serilog.Sinks.Postgresql.Alternative/blob/master/src/Serilog.Sinks.Postgresql.Alternative/Sinks/PostgreSQL/PostgreSQLSink.cs#L54
I'd suggest deprecating
failureCallback
, and changing the implementation to:The Serilog infrastructure also handles
SelfLog
so this can be dropped.Let me know if you'd like a PR along these lines. Cheers!
The text was updated successfully, but these errors were encountered: