is there any message type I can specify in the Elmah settings? It seems it can only log errors but not normal messages.
Or is there any plug in for Elmah to handle that?
Thanks in advance!
In this article ELMAH is a free, open source error logging library that includes features like error filtering and the ability to view the error log from a web page, as an RSS feed, or to download it as a comma-delimited file.
Build the application, run it in the browser, and navigate to http://www.yoursite.com/elmah.axd. You are prompted to log in before you see the content. After a successful authentication, you see a web page to remotely view the entire log of recorded exceptions.
To log a handled exceptionCreate the method that will generate the exception information. Use a Try...Catch block to catch the exception. Put the code that could generate an exception in the Try block. Uncomment the Dim and MsgBox lines to cause a NullReferenceException exception.
According to the post - ELMAH for simple logging from the Elmah Google Groups:
ELMAH is not a general purpose logging facility so I would discourage using it such. It is designed and therefore best suited for logging unhandled exceptions. You can however use ELMAH together with a general purpose logger
There are many general purpose logger available, like NLog, log4net, Enterprise Library, Common Logging, etc. I would suggest you look into some of these as solutions for general purpose logging. Some of these provide bridges for Elmah that you may be able to leverage.
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