eWorld.UI - Matt Hawley

Ramblings of Matt

Bug Tracking Provider Block

June 25, 2004 19:31 by matthaw

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.



Categories: .NET
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

Comments

June 26. 2004 00:28

Cool implementation of the Provider Model.

Rogelio Morrell

June 26. 2004 14:01

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

http://

June 26. 2004 16:16

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.

Matt Hawley

Comments are closed

Copyright © 2000 - 2024 , Excentrics World