Blog Stats
  • Posts - 160
  • Articles - 0
  • Comments - 48
  • Trackbacks - 3

 

October 2009 Entries

Neat Trace Writer Trick

This is one that my colleague Mattias showed me. When I code SharePoint solutions I’m always to put in some diagnostics logging just so that I can turn it on and se what happens. There is (as always) a couple of options here. Write to the ULS logs, which I guess is the preferred way to do it and then use event throttling to turn it on and off. However sometimes its just a bit to much work. So, here’s the trick. Sprinkle Trace.Writer's in your code where it makes sense. So for example i might want do put the following...

 

 

Copyright © Niklas Nihlen