Author: mickw
Date: 2006-05-16 09:37:11 +0200 (Tue, 16 May 2006)
New Revision: 2921

Modified:
   
trunk/src/java/no/schibstedsok/front/searchportal/query/parser/AbstractQueryParser.java
Log:
// also let product department know these queries are not working

Modified: 
trunk/src/java/no/schibstedsok/front/searchportal/query/parser/AbstractQueryParser.java
===================================================================
--- 
trunk/src/java/no/schibstedsok/front/searchportal/query/parser/AbstractQueryParser.java
     2006-05-15 14:30:04 UTC (rev 2920)
+++ 
trunk/src/java/no/schibstedsok/front/searchportal/query/parser/AbstractQueryParser.java
     2006-05-16 07:37:11 UTC (rev 2921)
@@ -39,6 +39,7 @@
     /** Protected so an .jj file implementing this class can reuse.
      **/
     protected static final Logger LOG = 
Logger.getLogger(AbstractQueryParser.class);
+    private static final Logger PRODUCT_LOG = 
Logger.getLogger("no.schibstedsok.Product");
     private static final Stack<String> METHOD_STACK = new Stack<String>();
 
     /** Error message when the parser tries to parse an empty query string.
@@ -46,6 +47,7 @@
     protected static final String ERR_EMPTY_CONTEXT
         = "The \"QueryParser(QueryParser.Context)\" constructor must be used!";
     private static final String ERR_PARSING = "Unable to create RunningQuery's 
query due to ParseException of ";
+    private static final String INFO_UNSUPPORTED_QUERY_SYNTAX = 
"<invalid-query>";
 
     /** the context this query parser implementation must work against.
      ***/
@@ -87,8 +89,12 @@
                 
             }catch(ParseException pe){
                 LOG.warn(ERR_PARSING + queryStr, pe);
+                // also let product department know these queries are not 
working
+                PRODUCT_LOG.info("<invalid-query type=\"ParseException\">" + 
queryStr + "</invalid-query>");
             } catch (TokenMgrError tme)  {
                 LOG.error(ERR_PARSING + queryStr, tme);
+                // also let product department know these queries are not 
working
+                PRODUCT_LOG.info("<invalid-query type=\"TokenMgrError\">" + 
queryStr + "</invalid-query>");
             }
             
             if( query == null ){

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to