I am using Elmah to log errors in the DB and send an email of the error. I have created a filter to not send 404 page errors by email but this is also filtering them from the DB.
How do I create a filter to prevent certain errors being sent by email but will allow them to be logged in the DB?
I would prefer a web.config solution.
Update:
I wouldn't mind any solution.
In web.config elmah section add:
<errorFilter>
<test>
<and>
<equal binding="HttpStatusCode" value="404" type="Int32" />
<regex binding="FilterSourceType.Name" pattern="mail" />
</and>
</test>
</errorFilter>
You can find the wiki here:
http://code.google.com/p/elmah/wiki/ErrorFiltering
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