07 September 2010

BizTalk Logging

I've read a few blog posts from respected BizTalk experts and the opinions are mixed over the use of debugging/tracing techniques. Some advocate it, others prefer to use BizTalk's suite of monitoring tools and built-in functionality to view what is going on with messages and routing.

My skin has been saved a few times by using explicit tracing and debugging so I'm going to stick with it. One thing I did notice is that often people will write directly to the event log in expression shapes. While that might seem fine, the logging implementation is tightly coupled to the event log. A more flexible approach is to write to the Trace and Debug subsystems (in System.Diagnostics). Listeners can be configured (and modified) in the BTSNTSvc.exe.config file quite easily. Just ensure the BizTalk service account has permissions to write to the target (eg event log or text file) otherwise nothing will show up.


No comments: