Log4Net Backup Appender

46 Views Asked by At

I am running Log4Net in a .NET CORE 3.1 web app. I have almost everything the way I want it. There is one thing that is eluding me though. I have an appender that logs to my SQL Server DB. If and only if the connection goes down or the DB can't create a row, I want my windows event log appender to kick in and log both that the DB is down AND the event that was going to go to the DB. I can think of some hacky ways to do this, but I'm looking for the most elegant / robust solution possible. I imagine this is a pretty common scenario, but I couldn't find any help on the internet. If anyone could point me in the right direction, I would greatly appreciate it. Thanks!

0

There are 0 best solutions below