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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -