WARN Robot Detection.Exclude Robots

sitecore

When troubleshooting an issue, I noticed thousands of log entries starting with WARN Robot Detection.Exclude Robots. Unsure if this was a problem that needed solving, I reached out to Sitecore Support to get their take on the issue.

The Issue

The types of logs that we were seeing are similar to the below:

16776 10:03:50 WARN Robot Detection.Exclude Robots: Before Device Detection Bot call
16776 10:03:50 WARN Robot Detection.Exclude Robots: After Successful Device Detection Bot call

The Solution

When I reached out to the support team, I received the following response:

The warnings you’re seeing are being logged in the “Sitecore.Analytics.Pipelines.ExcludeRobots.CheckDeviceType” processor. They occur whenever a device detection process is initiated for any request. One warning should appear for one session.

However, these warnings do not indicate any problems or errors. They are essentially routine notifications and don’t seem to be the reason why your personalization rules are not working for mobile devices.

If you prefer, you can configure a filter to exclude these warnings from your logs. This can be done by setting up a component to filter out the message based on a specific pattern. Here’s an example of how you might configure this:

<appender name="LogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
      <file value="$(dataFolder)/logs/log.{date}.txt" />
      <appendToFile value="true" />
      <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
      </layout>
      <filter type="log4net.Filter.StringMatchFilter">
            <stringToMatch value="Device Detection Bot call"/>
            <acceptOnMatch value="false"/>
      </filter>
      <encoding value="utf-8" />
</appender>

This setup should help you achieve the desired behavior of excluding specific warnings from your logs.

We have also registered a request for the product team to change the log level of these messages from WARN to DEBUG, so it will be considered for further implementation.

To track the future status of this request, you can use reference number 607625. More information about public reference numbers can be found here: https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0853187

Viacheslav Mudrak

Summary

Thought it was worth adding this post, in case someone else is facing a similar issue and is inundated with all these logs… like Viacheslav says, they are not a problem, but if you dont want them showing, consider adding the suggested patch.

Leave a Reply

Your email address will not be published. Required fields are marked *