6

We have Publisher Logging enabled, which can be set in the Tridion MMC. This was working as expected from a long time creating the logs at the location "{%TridionDir%}/log".

Issue:

We noticed that file size of publisher logs was around 64 GB, needless to say we didn't want that big of a log file and tried to look for the option if we can set some file size limit on it, but couldn't find any setting to control it.

What we tried:

We know that most of the Tridion log files could be control for size (Rolling Policies) in "Logback.xml" file as answered here. But looks like Publisher Logs can't be controlled from it(Correct me If I am wrong).

We observed that Tridion uses Microsoft's Enterprise Library Logging Application Block for publisher logging and the listener is set in the file "TcmPublisher.exe.config" as below:

<add fileName="C:\Program Files (x86)\Tridion\log\TcmPublisher.log"
        formatter="Log Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=349a39f202fa9b53"
        traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=349a39f202fa9b53"
        name="Tridion CM Publisher Log File" />

So the Listener Type used is FlatFileTraceListener, which has no file size limit or rolling policy support. I tried using RollingFileTraceListener in place of FlatFileTraceListener as it support rolling policy but it didn't work and stopped logging. Also looks like there is some xsd to validate TcmPublisher.exe.config file as it throws a validation error in MMC as below:

enter image description here

Questions:

  1. Is there a setting to limit the file size of the Publisher Logs?

  2. If not, is there some other advanced way achieving it?

4

I note that the logging defaults to false and I wonder if this is the reason. I don't see anywhere that you can control the size of the log (or to have a larger set of data broken across multiple files) as you would in say, Log4Net.

I think the answer is "manage this by the process in DevOps" ... if you must log[1] then someone should be monitoring[2] the filesize and/or have a {automated?} process for renaming (or removing) the current file and letting the Publisher create a new one[3].

[1] Probably only WARN, if not ERROR

[2] Monitoring can be as simple as a PowerShell monitoring app

[3] It may be that you need to stop the Publisher Service and therefore do this out of hours

  • 1
    It is indeed not possible to configure a rolling log file for publisher file logging (yet); publisher file logging is normally only used temporarily for diagnostic purposes. – Rick Pannekoek Apr 27 '17 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.