AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.07.2018, 05:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
powerobjects: Conditionally Enable Plugin Context Logging Via Secure Configuration
Источник: https://www.powerobjects.com/2018/07...configuration/
==============


The out of box Plugin Tracing introduced in CRM 2015 SP1 has made tracing plugins within Microsoft Dynamics 365 for Customer Engagement a much more streamlined process. Being able to control what is logged from a system level (nothing, exceptions only, or all) also helps to ensure you only are only incurring the cost of logging when desired.

Unfortunately, there is no support out of the box for enabling/disabling tracing at a plugin specific level. This becomes even more apparent when developers are trying to troubleshoot a plugin and haven’t added any additional logging. Normally this requires the developer to make additional logging calls in the plugin; recompile, redeploy, and retest, and then go back and remove the additional logging when the cause and fix have been determined. Not only is this extremely time intensive, it really isn’t an option for troubleshooting an issue in production.

A simple solution to this problem is to utilize a base plugin class for all plugins that conditionally logs the plugin context based on information in the Secure Configuration of the plugin registration. The result is if additional logging is desired for a particular plugin, you can enable/disable it via the plugin registration, without having to recompile, or redeploy code! The Secure Configuration is used since it isn’t migrated with solutions, so if you have the additional logging enabled in one environment, extracting the registration step via a solution and importing it into another environment will not affect tracing.

Below is a sample plugin base class that will trace the plugin context pre-plugin execution if “PluginBase.TracePreContext” is found in the Secure Configuration, and the context post-plugin execution if “PluginBase.TracePostContext” is found in the Secure Configuration, and both if “PluginBase.TraceContext” is found.



There you have it! Subscribe to our blog for more helpful tips and tricks!

Happy Dynamics 365’ing!



Источник: https://www.powerobjects.com/2018/07...configuration/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
powerobjects: Using Canary and Plugin Trace Viewer to Track Down Performance Issues Blog bot Dynamics CRM: Blogs 0 07.07.2018 00:17
powerobjects: Electronic Reporting in Dynamics 365 for Finance and Operations Blog bot DAX Blogs 0 14.02.2018 03:28
powerobjects: Field Service Mobile App: Set up and Configuration for Dynamics 365 Online Blog bot Dynamics CRM: Blogs 0 16.01.2018 01:12
Inside Dynamics AX 4.0: Licensing and Configuration Blog bot DAX Blogs 0 31.10.2007 11:40
при построении перекрёстных ссылок выдаётся сообщение об ошибках mmmax DAX: Программирование 10 21.01.2005 12:42
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:40.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.