Configure diagnostic logging in Unified Service Desk
Unified Service Desk and the underlying support libraries provide several layers of diagnostic logging that you can use to help troubleshoot issues. You can also use diagnostic logs in a production deployment of Unified Service Desk to troubleshoot specific issues on an ongoing basis.
By default, error logging is enabled for the Unified Service Desk client application. A log file, UnifiedServiceDesk.log, is available at the following location on the client computer to record operational errors in the client application: c:\Users\<UserName>\AppData\Roaming\Microsoft\UnifiedServiceDesk\<Version>. The log file is created the first time you encounter any errors in the client application.
In This Topic
Configure diagnostic logging
Diagnostic log sources
Diagnostic logging levels
Diagnostic log listeners
Configure diagnostic logging
You can enable logging by using the UnifiedServiceDesk.exe.config file, which is available in the Unified Service Desk client installation directory on your computer. To configure the type of logging and location of the Unified Service Desk log file:
Open the UnifiedServiceDesk.exe.config file for editing. If you installed the Unified Service Desk client at the default location, this file will typically be available at C:\Program Files\Microsoft Dynamics CRM USD\USD.
Navigate to the
<switches>
section in the file:<switches> <!-- Possible values for switches: Off, Error, Warning, Information, Verbose Verbose: includes Error, Warning, Info, Trace levels Information: includes Error, Warning, Info levels Warning: includes Error, Warning levels Error: includes Error level --> <add name="EventTopicSwitch" value="Error"/> <add name="Microsoft.Uii.Common.Logging" value="Error"/> <add name="Microsoft.Xrm.Tooling.CrmConnectControl" value="Error"/> <add name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient" value="Error"/> <add name="Microsoft.Xrm.Tooling.WebResourceUtility" value="Error"/> <add name="Microsoft.Crm.UnifiedServiceDesk" value="Error"/> <add name="Microsoft.Crm.UnifiedServiceDesk.Dynamics" value="Error"/> <add name="Microsoft.Crm.UnifiedServiceDesk.CommonUtility.UserProfileManager" value="Error"/> <add name="UnifiedServiceDesk.KPIControl" value="Error"/> </switches>
In the
<switches>
section, specify a logging source (such asEventTopicSwitch
), and then specify a logging level value (such asError
). The<switches>
section controls logging levels for various sources. By default, error logging is enabled for all the switches:For information about the available logging sources, see Diagnostic log sources later in this topic.
For information about the values that you can specify for each logging source, see Diagnostic logging levels later in this topic.
To configure the location of the log files, navigate to the
<shareListeners>
section in the file:<sharedListeners> <add name="fileListener" type="Microsoft.Xrm.Tooling.Connector.DynamicsFileLogTraceListener, Microsoft.Xrm.Tooling.Connector" BaseFileName="UnifiedServiceDesk" Location="LocalUserApplicationDirectory" /> <add name="USDDebugListener" type="Microsoft.Crm.UnifiedServiceDesk.Dynamics.UsdTraceListener, Microsoft.Crm.UnifiedServiceDesk.Dynamics" /> </sharedListeners>
The
<sharelisteners>
section controls location and type of logs that are generated for Unified Service Desk. By default,fileListener
will create a file called UnifiedServiceDesk.log in c:\Users\<UserName>\AppData\Roaming\Microsoft\UnifiedServiceDesk\<Version> directory, andUSDDebugListener
will create events in the Debug Output tab of the Debugger hosted control.If you want to change the location of the UnifiedServiceDesk.log file, change the value of the
Location
parameter.By default, file and debugger logging is enabled for all sources. If you want to add or remove a listener from a diagnostic source, locate the required source in the
<sources>
section, and then modify the<listeners>
section of the source to include the listener you want.For example, to add event logging for the Unified Service Desk, add the event logging listener to the
Microsoft.Crm.UnifiedServiceDesk
source:<source name="Microsoft.Crm.UnifiedServiceDesk" switchName="Microsoft.Crm.UnifiedServiceDesk" switchType="System.Diagnostics.SourceSwitch"> <listeners> <add name="fileListener"/> <add name="USDDebugListener" /> <add name="eventLogListener" type="System.Diagnostics.EventLogTraceListener" initializeData="USD"/> </listeners> </source>
This will now report events to the Windows event log with the tag “USD”, in addition to the file and Debugger. For more information about diagnostic listeners, see Diagnostic log listeners later in this topic.
Diagnostic log sources
Common troubleshooting log sources are listed in the following table.
Source Name | Description |
---|---|
EventTopicSwitch |
Detailed User Interface Integration (UII) logging source for monitoring messaging traffic inside UII. |
Microsoft.Uii.Common.Logging |
General UII Log source for messages reported by UII. |
Microsoft.Xrm.Tooling.CrmConnectControl |
Log source for the sign-in process to CRM. This source will report general or detailed diagnostics information about the sign-in procedure. |
Microsoft.Xrm.Tooling.Connector.CrmServiceClient |
Log source for all CRM data-level interactions. This source will report all interactions with CRM, exceptions and timings. |
Microsoft.Xrm.Tooling.WebResourceUtility |
Log source for requests for Web Resource data via the CRM interface link. |
Microsoft.Crm.UnifiedServiceDesk |
Log source for core Unified Service Desk functionality. This log source will report actions and events that are core to Unified Service Desk. |
Microsoft.Crm.UnifiedServiceDesk.Dynamics |
Log source for Unified Service Desk boot strap and loading processor. This source will report actions and events that are part of initializing and starting the UII and Unified Service Desk. |
Microsoft.Crm.UnifiedServiceDesk.CommonUtility.UserProfileManager |
Log source for actions that interact with the UserProfile system; this is part of the caching system. More information: Configure client caching in Unified Service Desk |
You can toggle each of these log sources independently to support troubleshooting and isolation of issues or information inside Unified Service Desk.
Diagnostic logging levels
There are several distinct logging levels available for use. However, as you increase the level of logging, more data is generated and stored in the log files.
Log Level | Description |
---|---|
Off |
Disables all events from this source. |
Error |
Reports only error events. |
Warning |
Reports errors and warning events. |
Information |
Reports errors, warnings, and information events. |
Verbose |
Reports errors, warnings, information, and verbose events. |
ActivityTracing |
Reports errors, warnings, information, and verbose events, and activity tracing (method names). Note ActivityTracing is available only on some of the sources. |
All |
Reports all events raised by the system. |
Diagnostic log listeners
Diagnostics log listeners are used to target the diagnostic log output to files, the event log, or other sources. By default, all diagnostic sources are wired to both the default (Debugger) and file (text) listeners. You can configure additional log listeners for diagnostic logging for Unified Service Desk. For more information about the .NET default listeners, see:
You can also create custom listeners to send diagnostic logs to a location of your choice. Custom listeners are created by deriving a class from the TraceListener abstract class. You can find a walkthrough of the process on CodeGuru.com.
See Also
Concepts
Debug issues in Unified Service Desk
Other Resources
Troubleshoot Unified Service Desk using debugger and diagnostic logging
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.