velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1769848 - in /velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view: BrowserTool.java UAParser.java
Date Tue, 15 Nov 2016 15:28:58 GMT
Author: cbrisson
Date: Tue Nov 15 15:28:58 2016
New Revision: 1769848

URL: http://svn.apache.org/viewvc?rev=1769848&view=rev
Log:
[tools] UAParser logs should go to BrowserTool logger

Modified:
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java?rev=1769848&r1=1769847&r2=1769848&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
(original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
Tue Nov 15 15:28:58 2016
@@ -155,7 +155,7 @@ public class BrowserTool extends Browser
         {
             userAgentString = ua;
             lowercaseUserAgentString = ua.toLowerCase();
-            userAgent = UAParser.parseUserAgent(ua);
+            userAgent = UAParser.parseUserAgent(ua, getLog());
         }
     }
 

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java?rev=1769848&r1=1769847&r2=1769848&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java
(original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java
Tue Nov 15 15:28:58 2016
@@ -24,8 +24,6 @@ public class UAParser
     {
     }
 
-    protected static Logger LOG = LoggerFactory.getLogger(BrowserTool.class);
-
     public static class UAEntity
     {
         private String name = null;
@@ -243,7 +241,7 @@ public class UAParser
     }
 
     /* the big hairy parsing method */
-    public static UserAgent parseUserAgent(String userAgentString)
+    public static UserAgent parseUserAgent(String userAgentString, Logger log)
     {
         UserAgent ua = null;
         try
@@ -588,7 +586,7 @@ public class UAParser
         }
         catch (Exception e)
         {
-            LOG.error("Could not parse browser for User-Agent: {}", userAgentString, e);
+            log.error("Could not parse browser for User-Agent: {}", userAgentString, e);
             ua = null;
         }
         return ua;



Mime
View raw message