I have to write a centralized logging framework.
Basic requirements are:
- Log exceptions as well as other details if needed to SQL Server DB.
- If DB is down i.e. a failover option is to log to a file and email
I had done some reading around and looks NLog is the best option being simple and most features I need. My plan is to write a wrapper class library around NLog and use my library in all my asp.net applications, web api as well as other library projects and some classic asp sites using COM+.
But I noticed some people mentioning using ELMAH for exception handling and NLog for diagnostics.
My Question(or I should say confusion): Why would I use ELMAH if I am using NLog?
Or when would one use ELMAH alongside NLog?
Or
Note I am not trying to compare the features-by-feature but want to understand: What would be the scenario when one would opt for one over other? Except the fact that ELMAH is for web applications.