How to enable tracing in Microsoft Dynamics CRM 3.0 (907490)



The information in this article applies to:

  • Microsoft CRM 3.0

INTRODUCTION

This article describes how to enable tracing in Microsoft Dynamics CRM 3.0.

MORE INFORMATION

Microsoft Dynamics CRM 3.0 lets you create trace files that monitor the actions that are performed by Microsoft CRM. Trace files are helpful when you have to troubleshoot error messages or other issues in Microsoft CRM.

You can create unmanaged trace files and managed trace files. The information in the unmanaged trace files and in the managed trace files is determined by required and optional registry entries that you create manually. You create these registry entries on the Microsoft CRM server or on the computer that is running the Microsoft CRM client for Microsoft Office Outlook after you install Microsoft CRM or the Microsoft CRM client for Outlook.

The following are the required registry entries. For more information about the location of these registry entries, see the "Registry entry locations" section.
NameTypeData ValueNotes
TraceEnabledDWORDA value of 0 or 1If you use a value of 0, tracing is disabled. If you use a value of 1, tracing is enabled.
TraceDirectoryStringC:\CRMTraceThe TraceDirectory registry entry specifies the directory for the trace log files. The directory must exist, and the user who starts the Microsoft CRMAppPool must have full control over this directory. When you install Microsoft CRM, the default user is NT AUTHORITY\NETWORK SERVICE.
TraceRefresh DWORDA number between zero and 99When the data is changed, the trace settings in the other trace registry entries are applied.
The following are the optional registry entries.
NameTypeData ValueNotes
TraceCategoriesString or Multi-StringCategory.Feature:TraceLevelThe TraceCategories registry entry is a combination of a category, a feature, and a trace level. You can specify multiple categories, features, and trace levels. Separate each combination by using a semicolon. For a list of categories, features, and trace levels and for sample combinations that are valid, see the "Trace level values" section.
TraceCallStackDWORDA value of 0 or 1If you use a value of 0, the call stack is not included in the trace file. If you use a value of 1, the call stack is included in the trace file.
TraceScheduleStringMonthly, Weekly, Daily or HourlyThe TraceSchedule registry entry specifies when new trace files are created.
TraceFileSizeLimitDWORDA size between 1 and 100 megabytesThe TraceFileSizeLimit registry entry specifies the maximum size of trace files. New files are created when the limit is reached.
If you do not create the optional registry entries, the default data values are used. For more information about the default data values, see the "Default data values for optional registry entries" section. If you create the registry entries but do not specify data values for the registry entries, tracing will not work.

When you use Weekly as the data value for the TraceSchedule registry entry, the date section of the file name for unmanaged trace files is set to the date that the file was created. The date section of the file name is not set to the start of the week. However, managed trace files will have the correct date stamp if you use Weekly as the data value for the TraceSchedule registry entry.

Note We recommend that you use Daily or Hourly as the data value for the TraceSchedule registry entry. If you use Weekly or Monthly as the data value, large trace files may be created.

Registry entry locations

The Microsoft CRM server tracing registry entries are located in the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM

The Microsoft CRM client for Outlook tracing registry entries are located in the following registry subkey:

HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\MSCRMClient

Complete list of category values for the TraceCategories registry entry

  • *
  • Application.*

    The Application.* category includes the following:
    • Application.Outlook
  • Exception
  • ObjectModel
  • ParameterFilter
  • Platform.*

    The Platform.* category includes the following:
    • Platform.ImportExportPublish
    • Platform.Sdk
    • Platform.Metadata
    • Platform.Sql
    • Platform.Workflow
    • Platform.Soap
  • SchedulingEngine.*
  • Unmanaged.*

    The Unmanaged.* category includes the following:
    • Unmanaged.Outlook
    • Unmanaged.Platform
    • Unmanaged.Sql

Trace level values

Complete list of valid trace level values for TraceCategories

  • Off
  • Error
  • Warning
  • Info
  • Verbose
Note A message is logged only if the trace level for the category is equal to or greater than the level of the message. For example, a trace level of Warning logs messages that have a level of Warning and of Error. A trace level of Info logs messages that have a level of Info, of Warning, and of Error. A trace level of Verbose logs all messages. You should only use a trace level of Verbose for short durations.

Sample category and trace level combinations

  • *:Verbose

    Note The *:Verbose combination logs all messages in all categories. You should only use the *:Verbose combination for short durations.
  • Application.*:Error

    Note The Application.*:Error combination logs all messages that have a level of Error for the Application.* category.
  • Platform.*:Warning

    Note The Platform.*:Warning combination logs all messages that have a level of Warning or Error for the Platform.* category.

Default data values for optional registry values

  • TraceCategories: *:Error
  • TraceCallStack: 0
  • TraceSchedule: Daily
  • TraceFileSizeLimit: 5

Modification Type:MinorLast Reviewed:9/7/2006
Keywords:kbMBSMigrate kbinfo KB907490 kbAudEndUser