Bug Tracking Provider Block

Published 25 June 04 11:31 AM | mhawley

The past few days I decided that my bug tracking component that I created for WebDeploy needed an overhaul. It was built directly to interface with FogBUGZ, and didn't allow for support of any other method. Alas, I thought the provider model could come in extremely handy - and it did.

Now, before you go off saying that Microsoft already created an Exception Handling Block that does almost what I did, I want to say that this was done in response to bug tracking specifically. It has a namespace structure of ErrorHandling, however that is just for future additions. Currently it only supports "Tracking."

So, what's this all about? Well, I'm releasing my ErrorHandling block that allows you to easily implement bug collecting into any application in any method using custom tracking providers. The current version comes with 3 tracking providers:

  • FogBUGZ (using scoutSubmit.asp)
  • Email
  • EventLog

To use it, it's as simple as calling:

eWorld.ErrorHandling.Tracking.Submit("Subject", "Body", "Creator Name", "Creator Email", true);

However, its not just that simple - a custom configuration section needs to be declared to allow the different tracking providers to be loaded. A sample configuration file comes with the download, but here's a summary of what the custom configuration section needs to look like:

<bugTracking>
 
<trackers defaultProvider="FogBUGZ" enabled
="true">
   
<clear
/>
    <add
 
         name="FogBUGZ"

         type
="eWorld.ErrorHandling.Providers.FogBugzTrackingProvider, eWorld.ErrorHandling"
         url
="http://www.yourserver/FogBUGZ/scoutSubmit.asp"
         user="<User>"
         project
="<Project>"
         area="<Area>"
/>
    <
add
         name
="Email"
         type
="eWorld.ErrorHandling.Providers.EmailTrackingProvider, eWorld.ErrorHandling"
         sendTo
="<Email>"
         smtpServer="<SMTPServer>"
/>
    <
add
         name
="EventLog"
         type
="eWorld.ErrorHandling.Providers.EventLogTrackingProvider, eWorld.ErrorHandling"
         eventLog
="<EventLog>"
         source="<Source>"
/>
  </trackers
>
</bugTracking>

Simple enough, right? Okay - so download the ErrorHandling block here, and make sure you keep an eye out for any new enhancements. If you've created another provider that you feel would be worthwhile to release, please submit it to me, and I'll see what I can do.

Filed under:

Comments

# Rogelio Morrell said on June 25, 2004 07:28 PM:

Cool implementation of the Provider Model.

# Michael Hensen said on June 26, 2004 09:01 AM:

Can you extend it to put the errors in a (sql)database ?

# Matt Hawley said on June 26, 2004 11:16 AM:

Michael,

If you wanted, you can. Just download the block and follow the 3 provider examples that I've already built. I didn't want to do this right away, because there is really no good "general" way of doing it, however the provider model allows you to extend with possibilities.

This Blog

News

.NET Links

Blogs I Read

Syndication