Rectangle 27 0

ASP.NET Logging log4net or health monitoring?


Scott Hanselman also had a good post on getting up and running with ELMAH: hanselman.com/blog/

Since then, I have implemented a slightly modified version of it and the logging plus e-mail is great and easy to integrate via the web.config file.

That was part of my "modification". I didn't want any of the logged information being exposed, so I watered it down to only log the information to the database and e-mail me. Then, when I get an e-mail, I can go look at the database log. I have not requirement for remote viewing anyway.

Note
Rectangle 27 0

ASP.NET Logging log4net or health monitoring?


Personally, I havent tried log4net but seen the specs and examples for winforms, but my organization coded our own logging mechanism that reports and logs errors that are caught in the global.asax that reports everything we need to know about the stack trace, session (if exists), form's NVC, version of the app, URL that originated the error with querystring, and HTTP headers. Though I noticed that not all errors get logged there; such as forms authentication expiration or application pool restart/shutdown or anything reported by IIS that was not thrown by the application executing.

Note