How To Enable Tracing in Microsoft Dynamics CRM
How To Enable Tracing in Microsoft Dynamics CRM
How To Enable Tracing in Microsoft Dynamics CRM
o o o o o o
INTRODUCTION MORE INFORMATION Required registry entries Optional registry entries Enabling Trace Settings with PowerShell Microsoft Dynamics CRM 4.0 and Microsoft Dynamics CRM
2011 trace log file locations Registry entry locations Complete list of category values for the TraceCategories
registry entry
o o o o o
Expand all | Collapse all INTRODUCTION
Microsoft Dynamics CRM 2011 Microsoft Dynamics CRM 4.0 Trace level values Complete list of valid trace level values for TraceLevel Sample category and trace level combinations Default data values for optional registry values Microsoft Dynamics CRM E-mail Router How to enable scheduled tracing How to disable scheduled tracing
This article describes how to enable tracing in Microsoft Dynamics CRM. Back to the top MORE INFORMATION
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 How to back up and restore the registry in Windows
Microsoft Dynamics CRM 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.
In Microsoft Dynamics CRM 2011 you can also enable tracing using PowerShell applets. See the section below titled Enabling Trace Settings with PowerShell. Back to the top
TraceDirectory String
TraceRefresh
DWORD A number between When the data is changed, the trace settings in the other trace registry entries are zero and 99 applied.
TraceCallStack
DWORD
A value of 0 or 1
TraceFileSizeLimit DWORD
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.
1.
command:
Add-PSSnapin Microsoft.Crm.PowerShell
This command adds the Microsoft Dynamics CRM Windows PowerShell snap-in to the current session. The snap-in is registered during installation and setup of the Microsoft Dynamics CRM server.
Get-CrmSetting TraceSettings
CallStack : True
Categories
: *:Error
Directory
: c:\crmdrop\logs
Enabled
: False
FileSize
: 10
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
1.
$setting.Enabled="True"
3.
Set-CrmSetting $setting
4. Type the following command to get a current list of
Get-CrmSetting TraceSettings
The output will resemble the following:
CallStack : True
Categories
: *:Error
Directory
: c:\crmdrop\logs
Enabled
: True
FileSize
: 10
Microsoft Dynamics CRM 4.0 and Microsoft Dynamics CRM 2011 trace log file locations
When you create a trace in Microsoft Dynamics CRM 4.0 or Microsoft Dynamics CRM 2011, the TraceDirectory registry key is ignored. For tracing on the Microsoft Dynamics CRM 4.0 server and the Microsoft Dynamics CRM 2011 server, the trace log file is created in the following folder: Drive:\Program Files\Microsoft Dynamics CRM\Trace For tracing on the Microsoft Dynamics CRM 4.0 client for Microsoft Office Outlook and for tracing on Microsoft Dynamics CRM 4.0 Data Migration Manager, the trace log file is created in the following folder if you do not have Update Rollup 7 or a later cumulative update: DriveName:\Documents and Settings\ InstallingUser \Application Data\Microsoft\MSCRM\Traces
For tracing on the Microsoft Dynamics CRM 2011 client for Microsoft Office Outlook and the Microsoft Dynamics CRM 4.0 client for Microsoft Office Outlook and for tracing on Microsoft Dynamics CRM 4.0 Data Migration Manager, the trace log file is created in the following folder if you have Update Rollup 7 or a later cumulative update installed: DriveName:\ InstallingUser \Local Settings\Application Data\Microsoft\MSCRM\Traces
Deployment_Sdk Exception Etm NewOrgUtility ObjectModel ParameterFilter Platform Platform_Async Platform_ImportExportPublish Platform_Import Platform_Metadata Platform_Sdk Platform_Soap Platform_Sql Platform_Workflow Reports Sandbox Sandbox_AssemblyCache Sandbox_LoadBalancer Sandbox_CallReturn Sandbox_EnterExit Sandbox_StartStop Sandbox_Performance Sandbox_Monitoring SchedulingEngine ServiceBus Shared SharePointCollaboration Unmanaged_Outlook Unmanaged_Platform
* Application.*
Application.Outlook
o o o o o o o
SchedulingEngine.* Unmanaged.*
o o o
Back to the top
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.
*: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.
To enable verbose operations log level, you must manually update the configuration by updating the registry. To do this, follow these steps:
1.
2.
3.
click OK. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ MSCRMEmail
4.
1. 5.
configuration file for the E-mail Router Service. To do this, follow these steps:
a.
In Windows Explorer, locate the Microsoft.Crm.Tools.EmailAgent.xml file. By default, this file is located in the following folder:
b.
c.
In the file, examine the <SystemConfiguration> node, and then scroll down the text toward the end of the file to find the following statement:
<LogLevel>1</LogLevel>
By default, this value is set to 1 (one). Modify this statement so that it reads as follows:
<LogLevel>3</LogLevel>
d. e.
Save the file. Restart the E-mail Router Service. You will find a new event viewer log view that is named MSCRMEmailLog. It is in this event viewer log view that the events appear.
1.
Set up the trace. When you set up the trace, enter all
the required values. However, leave the TraceEnabled registry entry set to 0.
2.
this, start Notepad, copy the following information to the document in Notepad, and then save the document as a .reg file:
3.
open a new document in Notepad, and then copy the following lines to the document in Notepad.
Note In the lines that you copy, replace the <C:\Enable.reg> placeholder with the path and the file name of the actual .reg file that you created in step 2.
4.
the new batch file that you created in step 3. Schedule the task for the time at which you want the trace to run.
this, start Notepad, copy the following information to the document in Notepad, and then save the document as a .reg file:
Note You must change the value of the TraceRefresh registry entry. If you do not change the value of the TraceRefresh registry entry, the trace will not be disabled.
2.
open a new document in Notepad, and then copy the following lines to the document in Notepad.
Note In the lines that you copy, replace the <C:\Disable.reg> placeholder with the path and the file name of the actual .reg file that you created in step 2.
3.
the new batch file that you created in step 3. Schedule the task for the time at which you want the trace to be disabled.
Back to the top Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.