Tracing the SharePoint Feature

To troubleshoot or debug the SharePoint feature you can enable tracing and then view the trace with a tool such as DebugView.

Enabling Tracing

To enable tracing, you will need to add a node to the web.config file for your SharePoint web application:

  1. Locate the web.config for your SharePoint web application. For example, you may find it at the following location: C:\Inetpub\wwwroot\wss\VirtualDirectories\80
  2. Edit the web.config file and add or update the <system.diagnostics> node within the root <configuration> node as follows:
    • If there is already an existing <system.diagnostics> node, replace it with the following node.
    • If there is no existing <system.diagnostics> node, add the following node just above the last line in the file that contains </configuration>.
      web.config snippet
      
      <system.diagnostics>
        <switches>
          <!-- 0=none, 1-errors, 2=warnings, 3=info, 4=verbose -->
          <add name="Atlassian.Confluence.SharePoint.Trace" value="4" />
        </switches>
      </system.diagnostics>
      
  3. Save the config file.
  4. Reset IIS.

Problems with Flushing Trace Output

In some cases, the trace output does not flush properly. If you think this is the case for you, you can try tracing to a particular file and making sure the trace is flushed regularly. Here is an example of how to do this. Note that with this approach the trace file will continue to get larger over time. You can uncomment the <remove name="Default" /> by simply removing the leading <!-- and traling --> portions if you want traces to only go to the file and not make them available to DebugView.

web.config snippet with autoflush

<system.diagnostics>
  <switches>
    <!-- 0=none, 1-errors, 2=warnings, 3=info, 4=verbose -->
    <add name="Atlassian.Confluence.SharePoint.Trace" value="4" />
  </switches>
  <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="myListener" 
          type="System.Diagnostics.TextWriterTraceListener" 
          initializeData="c:\SharePointConnector.log" />
        <!--<remove name="Default" />  -->
      </listeners>
    </trace> 
</system.diagnostics>

Tracing the Confluence Search Administration Pages

Note that if you want to trace the custom Confluence search administration pages, you need to enable tracing for the web.config used for your SSP web application. This is typically not the '80' directory as used in the example above nor is it the same directory/web application for SharePoint Central Administration.

Note that the search administration tracing note above also applies to seeing the search security trimmer tracing when clicking the 'view scopes' link within search administration. The scopes will currently always show as a count of zero items because the security trimmer does not have context into Confluence from the search administration pages. It does not know the Confluence server URL or how to log into Confluence. This is not an indication that you have a search configuration problem.

Viewing the Trace

The easiest way to view the trace is to download DebugView onto your SharePoint web server. When using this tool, make sure you go to the 'Capture' menu and choose 'Capture Win32'.

After you have updated your web.config, performed an IISRESET and started DebugView, you can navigate to pages within SharePoint and you should see trace messages related to the SharePoint Connector for Confluence.

Last modified on Mar 30, 2010

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.