[Originally Posted By]: http://dynamicscrmcoe.com/microsoft-dynamics-crm-2016-the-plugin-trace-log/
Microsoft Dynamics CRM 2016 – The Plugin Trace Log
Since Microsoft CRM 4.0, the tracing functionality has been a key factor in solving numerous amounts of issues that may be caused by plugin or workflow processes. Since Dynamics CRM 2016 is just right around the corner, I decided to have a look at the additional trace log functionality which Microsoft has included. The fact that Microsoft has finally included a streamlined method of providing a history of automated procedures in a central location, is definitely a step in the right direction for providing ease for development and debugging.
Out of the box, the Plugin Trace Log functionality is disabled. In order to enable it, you will need to go to Settings > Administration > System Settings > Customization tab. Once opened, you can enable the logging to be run on all messages or exceptions specifically.
The Plugin Trace Log
The Plugin Trace Log functionality can be found in the Customization section and is shown in a very similar format as other entities (since the information is now contained in an entity). You can also use the advanced find search functionality to search for the trace log records.
When a trace is logged, a new record is created containing specific information that could be beneficial for not only debugging but also for code optimization. With the inclusion of the basic log message block that was always inclusive when downloading the log file when an exception is triggered, the inner exception and stack trace details have also been outputted. Furthermore, other useful information, such as plug-in name, entity, message, depth, secure/unsecure configuration, depth, mode and so forth are also displayed.
The execution duration, which was only logged via the plugin registration tool profile record, is also outputted allowing for a better gauge of possible code optimization during code reviews for complex business executions and bottlenecks.
Here’s hoping in the near future, more extensive functionality present in existing external tools, such as the plugin registration tool profiler and diagnostic tool, will also be integrated. By doing so, this would provide a greater level of comprehensiveness within this new functionality, as well as minimizing the need to go directly to the CRM server itself or on a local machine. This effectively improves development efficiency.