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:
Questions:
Is there a setting to limit the file size of the Publisher Logs?
If not, is there some other advanced way achieving it?