How do I make Topshelf log exceptions to Elmah

520 views Asked by At

Topshelf is a great little library for wrapping up a windows service. I'm trying to find out if I can configure it to log out exceptions to elmah. From what I can tell it has an internal handler for unhandled exceptions.

http://docs.topshelf-project.com/en/latest/configuration/logging.html

Would it be a case of writing a new logger and submitting a pull request?

1

There are 1 answers

2
Travis On BEST ANSWER

Yes. Take a look at the existing logging implementations in the repository to get started. No one has asked for ELMAH before but I don't see why you'd be the only person interested.

You can also just create a new repository, it will be a new nuget package anyways.