Geeks With Blogs

News View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn
Michael Stephenson keeping your feet on premise while your heads in the cloud


More logging than a lumberjack



On one project our team inherited a BizTalk solution which had a lot of logging in it.  I feel that with both BizTalk and also standard .net projects when you see code with excessive logging in it is because the developer needed all of this information to be able to write the code and know what is happening.  This logging usually masks the fact that the code was very buggy during development and also probably has no unit tests or has very low code coverage. 



  1. A solution has too much logging
  2. Often people start to use the solution in system testing and production and there are a lot of queries about "what has happened" and no one really knows
  3. The unit testing of the solution will probably be poor and coverage will be low
  4. The event log will be very cluttered and often it will be difficult to find relevant information when troubleshooting


  1. Lack of confidence - People are not confident in the solution because it is often not well tested
  2. Bugs- Because it is usually has low test coverage the solution will usually


  1. Use BizUnit to test your BizTalk solutions.  This will result in a higher level of confidence and understanding of your code and as result you will not need to log as much
  2. Unit Test and .net code which will be called by your BizTalk solution.  Sometimes logging is used in say an orchestration to check the component returned what is expected.  If this had been correctly unit tested you would not need any of this.
  3. Use Tracing or a logging block.  Logging to the event log is okay for some things such as events etc but you often see unimportant information always being written to the event log.  If you use tracing for things which are not as important but you still feel you need to know then you can use trace listeners to turn it off or write things to different sources.  The other good thing is that this can be configured at runtime.  This also applies to logging blocks such as Enterprise Library or Log4net.  DebugView can also be a handy tool for viewing trace messages.
  4. Code reviews can be very important here because if a colleague reviews your solution they may be able to offer suggestions or identify things which they feel aren't right (such as excessive logging)



Posted on Monday, December 18, 2006 5:21 PM BizTalk | Back to top

Comments on this post: BizTalk Anti Pattern: More logging than a lumberjack

# re: BizTalk Anti Pattern: More logging than a lumberjack
Requesting Gravatar...
Amazing post thanks for sharing with all of us and we all are very thankful after seeing this postGJF
Feliz Navidad 2016
Feliz Año Nuevo 2017 GUTR BY7TGU8Y6F7T
Left by DIPIKA on Dec 16, 2016 9:58 PM

# re: BizTalk Anti Pattern: More logging than a lumberjack
Requesting Gravatar...
Left by mobdro tv app for pc on May 12, 2017 6:38 PM

# three month 2017 calendar
Requesting Gravatar...
Left by sudhasharma on Jun 15, 2017 6:09 PM

Your comment:
 (will show your gravatar)

Copyright © Michael Stephenson | Powered by: