Migrating Content Manager logging to NLog

Beginning in Tridion Sites 9.6, Content Manager uses the NLog logging platform instead of the logging mechanism provided by Microsoft Enterprise Library. When upgrading to Tridion Sites 10, you may need to migrate your existing logging settings to NLog.

About this task

Prior to Tridion Sites 9.6, the log settings for Content Manager are contained in the Tridion.ContentManager.config file. In Tridion Sites 9.6, these settings are contained in one or more NLog.config files.

If you are using the original default settings for logging and didn't add any new log listeners to the log settings in the "Tridion.ContentManager.config file, then you can go ahead with the upgrade. No additional steps are needed. If, however, you use custom settings or added new log listeners to Tridion.ContentManager.config, then follow the process described below to migrate your custom log settings to one or more NLog.config files.

Procedure

  1. Before starting the upgrade, do the following:
    1. Go to the the config\ subfolder of %TRIDION_HOME%.
    2. Make a copy of the Tridion.ContentManager.config file so that you can refer back to the settings for logging in the current Content Manager environment.
    3. Check for the configuration of additional log listeners and for any that are used, try to find equivalent log listeners for NLog (called targets in the NLog specification). If you can not find an equivalent log target, you can use a different target that covers most of your requirements or you can implement a custom target.
  2. Upgrade the system.
  3. After the upgrade, reconfigure logging in the NLog.config, making changes to the targets or rules, as needed.
    For details, see the related topic on configuring logging for Content Manager.