arouel / uadetector

UADetector is a library to identify over 190 different desktop and mobile browsers and 130 other User-Agents like feed readers, email clients and multimedia players. In addition, even more than 400 robots like BingBot, Googlebot or Yahoo Bot can be identified.
http://uadetector.sourceforge.net/
Apache License 2.0
246 stars 100 forks source link

"No pattern available for 'Personal computer'" #58

Closed mspiegel closed 10 years ago

mspiegel commented 10 years ago

I believe this is just a spurious output message but I see the following two log lines when using the uadetector library:

INFO  [2014-01-02 20:24:36,883] net.sf.uadetector.internal.data.DataBuilder: No pattern available for 'Other'.
INFO  [2014-01-02 20:24:36,883] net.sf.uadetector.internal.data.DataBuilder: No pattern available for 'Personal computer'.

I have verified that a plain Internet Explorer user agent is reported as the 'Personal computer' category. I am using version 2013.11 of the uadetector-resources module.

arouel commented 10 years ago

This is expected by design and not an issue. Its only an information that currently no patterns are assigned to these categories (but maybe in future). Your example works since we fallback if no device category pattern matches. If you're interested you can study the logic behind in class AbstractUserAgentStringParser. The relevant code block start on line 84 and ends on 125.

mspiegel commented 10 years ago

That makes sense. I see that it's the only call to LOG.info() in the DataBuilder class. Any interest in lowering the log level for this message to DEBUG?

arouel commented 10 years ago

I've changed the log level to debug. See https://github.com/before/uadetector/commit/cc74088f3fd0a4760b67944d2ac712d195889ac4

Thanks for your feedback.

mspiegel commented 10 years ago

Thank you! This is a wonderful library.