How to customize the elmah list page

36 views
Skip to first unread message

Mahanthesh Kumbar

unread,
Jul 17, 2019, 7:49:49 PM7/17/19
to ELMAH
Is there a way to customize the elmah list page to include the search, sorting and filtering option to drill down to the error more faster.

Thomas Ardal

unread,
Jul 18, 2019, 1:33:39 AM7/18/19
to ELMAH
You can only do this by cloning the ELMAH source code and add the features you want manually.

Atif Aziz

unread,
Jul 18, 2019, 4:48:32 AM7/18/19
to el...@googlegroups.com
You can only do this by cloning the ELMAH source code and add the features you want manually.

That's not entirely accurate. You can completely replace the ELMAH web pages with your own. ELMAH's own ErrorLogPageFactory is an IHttpHandlerFactory implementation that's registered in you web.config and you can replace the registration with your own implementation:

<add name="ELMAH"
     verb="POST,GET,HEAD"
     path="elmah.axd"
     type="MyErrorLogPageFactory, SomeAssembly" preCondition="integratedMode" />

You can even implement the UI as regular Razor or Web Pages in your application. Putting them in an assembly is not a requirement but allows you to create a packaged and shippable UI that can be simply registered to be light-up in any ASP.NET application.

Is there a way to customize the elmah list page to include the search, sorting and filtering option to drill down to the error more faster.

The list page is not designed as a composable UI but if your goal is to keep the bulk of the UI and add some extra bells and whistles then you can hijack the page by injecting some JavaScript that provide that functionality either entirely on the client or through XHR calls back to the server (for search, filtering and sorting, for example). You can inherit from ELMAH's own ErrorLogPageFactory, take the HTML of the list page and inject some JavaScript. You then again register your subclass in place of ELMAH's handler factory. Whether it's easier to do this or write a modern UI from scratch using Angular/Vue/React and with your enhancements on top is something only you can decide. Have a look at also elvue, which adds charts and statistics on top ELMAH using Angular without ever needing to clone, change or maintain a fork of ELMAH.

- Atif

--
You received this message because you are subscribed to the Google Groups "ELMAH" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elmah+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elmah/a265d1b4-cf8f-4a46-8e7f-0fddf4daf3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Ardal

unread,
Jul 18, 2019, 11:19:03 AM7/18/19
to ELMAH
That's is a great point, Atif. Thank you for clearing up my too superficial answer here 👍


On Thursday, July 18, 2019 at 10:48:32 AM UTC+2, Atif Aziz wrote:
You can only do this by cloning the ELMAH source code and add the features you want manually.

That's not entirely accurate. You can completely replace the ELMAH web pages with your own. ELMAH's own ErrorLogPageFactory is an IHttpHandlerFactory implementation that's registered in you web.config and you can replace the registration with your own implementation:

<add name="ELMAH"
     verb="POST,GET,HEAD"
     path="elmah.axd"
     type="MyErrorLogPageFactory, SomeAssembly" preCondition="integratedMode" />

You can even implement the UI as regular Razor or Web Pages in your application. Putting them in an assembly is not a requirement but allows you to create a packaged and shippable UI that can be simply registered to be light-up in any ASP.NET application.

Is there a way to customize the elmah list page to include the search, sorting and filtering option to drill down to the error more faster.

The list page is not designed as a composable UI but if your goal is to keep the bulk of the UI and add some extra bells and whistles then you can hijack the page by injecting some JavaScript that provide that functionality either entirely on the client or through XHR calls back to the server (for search, filtering and sorting, for example). You can inherit from ELMAH's own ErrorLogPageFactory, take the HTML of the list page and inject some JavaScript. You then again register your subclass in place of ELMAH's handler factory. Whether it's easier to do this or write a modern UI from scratch using Angular/Vue/React and with your enhancements on top is something only you can decide. Have a look at also elvue, which adds charts and statistics on top ELMAH using Angular without ever needing to clone, change or maintain a fork of ELMAH.

- Atif

On Thu, Jul 18, 2019 at 7:33 AM Thomas Ardal <thoma...@gmail.com> wrote:
You can only do this by cloning the ELMAH source code and add the features you want manually.

On Thursday, July 18, 2019 at 1:49:49 AM UTC+2, Mahanthesh Kumbar wrote:
Is there a way to customize the elmah list page to include the search, sorting and filtering option to drill down to the error more faster.

--
You received this message because you are subscribed to the Google Groups "ELMAH" group.
To unsubscribe from this group and stop receiving emails from it, send an email to el...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages