Tracing the SharePoint Feature (v 1.0)

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

Enable Tracing

To enable tracing, locate the web.config for your SharePoint web application (e.g., C:\Inetpub\wwwroot\wss\VirtualDirectories\80) and edit the web.config file by adding the following within the root <configuration> node. A good place to put this snippet is just above the last line in the file that has </configuration>; however, you'll want to make sure there is not already a <system.diagnostics> node first.

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>

In some cases, the trace output doesn't flush properly. This has been found to be a problem with the traces from the search security trimmer, but only in certain circumstances. 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>

Confluence Search Administration Tracing

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.

You will likely need to perform an IISRESET after making this change.

View Trace

The easiest way to view the trace is to download DebugView on your SharePoint web server. When using, 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.