New CRM SDK Feature - Plugin Trace Logging

19 April 2015
Daniel Cai

In the past, plugin debugging has been a very challenging task when working with CRM online environment, due to the lack of a proper way to log error trace information.

The good news is, CRM Online 2015 Update 1 release has introduced a new feature which allows you to turn on plugin trace logging, debugging plugin code for CRM online server is no longer such a daunting job.

How to turn on Plugin Trace Logging

To turn on CRM plugin trace logging, you would navigate to Settings -> Administration -> System Settings.

2015-04 Turn on CRM Plugin Trace Logging - 1

2015-04 Turn on CRM Plugin Trace Logging - 2

Then you would navigate to Customization tab, and choose the desired option under "Plug-in and custom workflow activity tracing" section.

2015-04 Turn on CRM Plugin Trace Logging - 3

Note that although you are only seeing two options in the above screenshot, the final release will contain the following 3 options.

  • Off - Writing to trace log is disabled.
  • Exception - A PluginTraceLog record will be created when an exception is thrown in your plugin or workflow code.
  • All - PluginTraceLog records will be created whenever you make a call to tracingService.Trace method (tracingService is an instance of ITracingService), or anytime when an exception is thrown in your plugin or workflow code. Use this option with extra caution, as it could affect your system performance if you have been using tracing services extensively in your plugin code.

How to view Plugin Trace Log records

After you have chosen either one of the last two options (Exception or All), CRM system will record a log entry to the newly introduced PluginTraceLog entity when the corresponding event happens (a call to tracingService.Trace method or when an exception is thrown). To view the trace log records, you would navigate to Settings -> Customizations -> Plug-in Trace Log as shown below.

2015-04 View CRM Plugin Trace Logs

The trace log record will be able to help you troubleshoot your CRM plugin or workflow code.

Some Final Thoughts

For more details about this particular feature, please check out the following documentation link from CRM SDK team.

Hope you like this feature.

Read the full New SDK Capabilities Blog Series:

Archive

December 2024 1 November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

Tags