Sitecore Publishing Service Module causes excessive log records


Description

Continuous opening of the Publishing Dashboard of the Sitecore Publishing Service Module might lead to the Sitecore log file being overloaded with records similar to the following (approximately 50 records per second):

40040 13:08:28 INFO  Start processing HTTP request GET http://cs0180679sc911xm1.sps420/api/publishing/jobs/status
40040 13:08:28 INFO  Sending HTTP request GET http://cs0180679sc911xm1.sps420/api/publishing/jobs/status
27188 13:08:28 INFO  Received HTTP response after 1.7762ms - OK
34396 13:08:28 INFO Sending HTTP request POST http://cs0180679sc911xm1.sps420/api/publishing/manifests/querystatuses 34396 13:08:28 INFO Start processing HTTP request POST http://cs0180679sc911xm1.sps420/api/publishing/manifests/querystatuses 34396 13:08:28 INFO Sending HTTP request POST http://cs0180679sc911xm1.sps420/api/publishing/manifests/querystatuses 34396 13:08:28 INFO Received HTTP response after 4.7102ms - OK 34396 13:08:28 INFO End processing HTTP request after 4.9461ms - OK

Solution

To remove the unwanted messages and reduce the log records size, consider adding filters in the Sitecore.config file, after the following line:

<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender, Sitecore.Logging">
<file value="$(dataFolder)/logs/log.{date}.{time}.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="-1" />
<maximumFileSize value="10MB" />

For example, the following filters:

<filter type="log4net.Filter.StringMatchFilter">
<stringToMatch value="Start processing HTTP request" />
<acceptOnMatch value="false" />
</filter>
<filter type="log4net.Filter.StringMatchFilter"> <stringToMatch value="Sending HTTP request" /> <acceptOnMatch value="false" /> </filter>
<filter type="log4net.Filter.StringMatchFilter"> <stringToMatch value="Received HTTP response after" /> <acceptOnMatch value="false" /> </filter>
<filter type="log4net.Filter.StringMatchFilter"> <stringToMatch value="End processing HTTP request after" /> <acceptOnMatch value="false" /> </filter>