Does anyone know if there is a patch or anything kicking around for ELMAH that will extend its logging capabilities to include variables and/or session variables. Sometimes the errors i am logging are hard to trace without a bit more info.
If there开发者_运维问答 is nothing i might have a go at altering myself
Cheers Luke
An issue like this exists on ELMAH site. There, Martin provides a patch that allows you to log exception Exception.Data variable.
Apply the patch (manually if your ELMAH version isn't the right one) and just add
ex.Data["yourInfoKey"]="yourInfoValue";
to your exception just before throwing it.
It worked for me.
However, if you want to add columns to your ELMAH_Error table to be able to filter on them, I'm afraid you'll have to edit ELMAH source yourself.
精彩评论