asp.net - Elmah error logging, can I just log a message? -
i installed elmah (https://code.google.com/p/elmah/) asp.net application. possible log message without creating exception first?
catch(exception e) { exception ex = new exception("id = 1", e); errorsignal.fromcurrentcontext().raise(ex); }
so possible do:
errorsignal.fromcurrentcontext().log("hello testing elmah");
yes, can use errorsignal without throwing exception.
errorsignal.fromcurrentcontext().raise(new notsupportedexception());
for custom message, can create custom exception.
var customex = new exception("hello testing elmah", new notsupportedexception()); errorsignal.fromcurrentcontext().raise(customex);
Comments
Post a Comment