asp.net mvc - ELMAH SqlErrorLog -


i using elmah catch unhandled exceptions in application. run custom code when elmah writes log entry.

i created custom errorlog derived elmah.sqlerrorlog , set errorlog in web config files.

namespace test.logging 

{ public class mysqlerrorlog : elmah.sqlerrorlog { public mysqlerrorlog(string connectionstring) : base(connectionstring) {

    }      public override string log(elmah.error error)     {         return base.log(error);          //custom code     } } 

}

<errorlog type="test.logging.mysqlerrorlog, test" connectionstringname="elmah-sqlserver" /> 

it seems nothing happend. there no log record in database.

anybody me?

thanks advanced!

don't know if ever fixed this. came across post when trying fix similar problem. turned out missing constructor. in case, think it's namespace that's wrong, namespace test.logging, not test.

so, web.config line be:

<errorlog type="test.logging.mysqlerrorlog, test.logging" connectionstringname="elmah-sqlserver" /> 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -