Although the error signal is easy enough, but I want something much simpler and
cleaner, therefore I created this static class for my project, see if it is
useful to put in to the .dll for some simple logging requirement. I was
creating this for some logging and testing in production environment where VS
debugger could not be applied.
-----------------------
namespace Elmah
{
public static class SimpleLogger
{
public static void log(string errorMsg)
{
ErrorSignal.FromCurrentContext().Raise(new ElmahInfoLog(errorMsg));
}
}
public class ElmahInfoLog : NotSupportedException
{
public ElmahInfoLog(string message) : base(message) { }
}
}
---------------------
usage :
Elmah.SimpleLogger("this is a log message");
Original issue reported on code.google.com by data...@gmail.com on 9 Jan 2012 at 4:27
Original issue reported on code.google.com by
data...@gmail.com
on 9 Jan 2012 at 4:27