https://mssqlfun.com/2012/09/17/how-to-log-sql-server-custom-error-in-windows-event-log/
How to log SQL Server Custom Error in Windows Event Log ?