There is a Asp.Net Core project requirement that we need to log errors, warnings, information, exceptions, etc. to the streams below:
1) A SQL Server table.
2) During logging, if SQL Server database suddenly becomes unavailable, we'd like to continue logging by writing log entries to a shared network folder.
3) Again, if during logging, the shared network folder becomes unavailable, then we want to continue logging to a local folder.
Is this scenario something that Serilog (https://serilog.net/) can help us to achieve?
No, this isn't built into the Serilog sinks you have described.
Enabling all three sinks concurrently achieves roughly the same thing - you could avoid additional latency by writing through Serilog.Sinks.Async if the file I/O is a concern.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With