System administrators and developers can now configure CRM to write trace logs to a new CRM entity – ‘Plug-in Trace Log’.

These logs can then be viewed within the CRM web application, also from Advanced Find.

We cannot extend the “Plug-in Trace Log entity”. We can only view or delete records of the entity.

By default, permission to view the logs is enabled for System Administrators and System Customizers, but can be granted to other users

Enabling Activity Tracing

We can enable\disable from Settings -> Administration -> System Settings -> Customization

Enable Plug-in trace log

The setting provides the following options:

Off

Exceptions – log messages only if an exception is encountered in the execution pipeline

All – log all messages, even if there was no exception.

How is “Plug-in Trace Logs” different from developers logging in to their own custom entity?

The problem with writing logs to our own Custom entity is due to the fact plug-ins execute in transaction and the transaction is rolled back whenever an exception occurs anywhere in the event pipeline. As a result, the records written to the custom entity would also be rolled back.

And with new ‘Plug-in Trace Logs’ entity, the messages are logged even if an exception is encountered and the rest of the transaction is rolled back