How To: Obtain Workflow Trace in SharePoint

You can get a LOG file with your workflow trace following this steps:
1. Edit web.config.
2. Insert the following code just BEFORE <appSettings> (always AFTER </System.Workflow.ComponentModel.WorkflowCompiler>):

<system.diagnostics>
   <sources>
      <source name="System.Workflow.Runtime" >
         <listeners>
            <add name = "System.Workflow"/>
         </listeners>
      </source>
      <source name="System.Workflow.Runtime.Hosting">
         <listeners>
            <add name="System.Workflow"/>
         </listeners>
      </source>
      <source name="System.Workflow.Activities">
         <listeners>
            <add name="System.Workflow"/>
         </listeners>
      </source>
   </sources>
   <sharedListeners>
      <add name="System.Workflow"
      type="System.Diagnostics.TextWriterTraceListener"
      initializeData="C:MyWorkflowTrace.log"
      traceOutputOptions="DateTime,ProcessId"/>
   </sharedListeners>
   <switches>
      <add name="System.Workflow LogToFile" value="1" />
      <add name="System.Workflow.Runtime" value="All" />
      <add name="System.Workflow.Runtime.Hosting" value="All" />
      <add name="System.Workflow.Runtime.Tracking" value="All" />
      <add name="System.Workflow.Activities" value="All" />
      <add name="System.Workflow.Activities.Rules" value="All" />
   </switches>
</system.diagnostics>

Your Trace will appear on the path that you’ve set in ‘initializeData’ (in this case: C:MyWorkflowTrace.log).
More Information:
http://msdn.microsoft.com/en-us/library/ee518966.aspx
http://support.microsoft.com/kb/972914/en-us

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.