Saturday, October 11, 2014

#SharePoint | Enabling Workflow Trace Logs

Even though we may have changed customerrors to off in the various web.config files:
  • wwwroot
  • template\admin
  • template\layouts
We may still get pages like these, specially after the workflow starter page, IniWrkflIP.aspx.

This article has a great step-by-step tutorial on how to enable debugging of workflows in SharePoint 2007.
However, this wasn't working for me, so after a few trial-and-error, I managed to get it to work simply by pasting the below in the web.config of the web application.

The .log document is created, but only when a workflow starts.
Apparently, if for some reason the workflow fails to start, nothing is ever logged.

  <!-- enable workflow tracing -->
      <source name="System.Workflow.Runtime" >
          <add name = "System.Workflow"/>
      <source name="System.Workflow.Runtime.Hosting">
          <add name="System.Workflow"/>
      <source name="System.Workflow.Activities">
          <add name="System.Workflow"/>
      <add name="System.Workflow"
      <add name="System.Workflow.LogToTraceListeners" 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" />

How to enable logging information for several Windows Workflow Foundation namespaces

No comments:

Post a Comment