Beytan Kurt
Beytan Kurt

Reputation: 2263

Elmah log error page customization

I would like to use Elmah for logging of the operations in application and not just for errors (I know it, literally means error logging module).

So, I would like to customize the default error view screen (../elmah.axd):

I have wishes like below:

  1. Change the Column Name "Error" for "Message"
  2. Use html tags in the error message.

For logging a custom information, I'm using a method like:

ErrorSignal.FromCurrentContext().Raise(new Elmah.ApplicationException(message));

But it does show the message in a span tag and if I use any <a href=""> or <br /> or even &lt; the result is as written and not seen as html attribute.


The default page is below for visual understanding:

enter image description here

Upvotes: 5

Views: 2060

Answers (1)

Akos Lukacs
Akos Lukacs

Reputation: 2047

Elmah is a single dll, so you have to download the source code, change rendering in ErroLogPage, ErrorDetailPage, rebuild, and deploy the modified assembly.

Or write a new custom display page that uses elmah errors directly stored in db/disk/etc.

Upvotes: 6

Related Questions