Logging to file

By default, the Publisher (including any C# fragment or .NET assembly Template Building Block involved in the publish action) logs to the Windows Event Log. You can configure the Publisher to also log to a file.

Procedure

  1. On the Content Manager server machine, access the bin\ subfolder of %TRIDION_HOME%.
  2. In this folder, open the file TcmPublisher.exe.config in a plain-text or XML editor. Find the following element: configuration > loggingConfiguration > categorySources. Within this element, find an add element that has its Value attribute set to the value Tridion.ContentManager.Templating.TemplatingLoggingCategory.
  3. Inside the listeners subelement of this element, remove the comment delimiters around the line:
    <!--add name="Tridion CM Publisher Log File" /-->

    so that it reads

    <add name="Tridion CM Publisher Log File" />
  4. The .NET assembly or C# fragment now writes log messages to an output file, which defaults to the file Tridion.ContentManager.Publisher.log in the log\ subfolder of %TRIDION_HOME%. You can change the path and/or file name by finding the element configuration > loggingConfiguration > listeners and finding the add subelement that has its name attribute set to the value Tridion CM Publisher Log File. Change the value of fileName attribute of this same element to set an alternative output path and/or filename. If you have activated logging of publisher actions in the Content Manager configuration file, Tridion.ContentManager.config, the Publisher itself also logs its messages to this log file.
  5. Save and close the TcmPublisher.exe.config file.
  6. From the Windows Administrative Tools, access Services and locate the service called Tridion Content Manager Publisher. Restart this service.