Thursday, 28 May 2015

Digging the new features of CRM 2015 Update 1 (Plug-In Trace Logs)

Plug-In Trace Logs
On the last version we used to use ( the ITracingService interface to log run-time information to help debug problems in plug-in execution. From now on we simple can view them on CRM trow the plugin-in trace logs. But bear in mind we always need to mention this in our code otherwise this will not trace when an exception shows up, for example:

// Extract the tracing service for use in debugging sandboxed plug-ins. // If you are not registering the plug-in in the sandbox, then you do // not have to add any tracing service related code.

ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
 catch (Exception ex)
                tracingService.Trace("MyPlugin: {0}", ex.ToString());

For more info:

No comments:

Post a Comment