Detailed logging for debugging?

Topics: Logging Application Block
Apr 21, 2010 at 12:37 AM


I have an app where on one clients pc the application does not run correctly. The process runs but the main window does not show and their are no errors. What i am looking for is a detailed way to log everything the application does specifically during the startup process. Is this possible with the Enterprise Library? If it is are their any detailed instructions on how to do this and also if it's possible is their a way you can enable / disable this through a debug argument when you run the process?

Apr 21, 2010 at 1:06 AM

You may want to check the event viewer if there are any errors logged there.

Are you allowed or is it feasible for you to do code changes?  'coz you can implement tracing here.  It's included in the documentation - Key Scenarios -> Tracing Activities and Propagating Context Information.  Tracing can be easily enabled and disabled in the config by selecting the Logging Application Block node and setting the TracingEnabled property to true/false.  The quickstart also includes a walkthrough on this. 

Or if you simply want to know what was the exception which causes your main window not to show up, put exception handling codes in places where you're suspecting the error occurred.  Make sure the exception policy you use logs the exception it catches.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.