Bug Tracking Provider Block

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.

3 Comments

Comments have been disabled for this content.