Changeset 31229

Show
Ignore:
Timestamp:
13.12.2016 16:22:24 (3 years ago)
Author:
ak19
Message:

Converting informative logger messages emitted with logger.error() into using logger.info() instead.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/OAIReceptionist.java

    r30034 r31229  
    108108     
    109109    if (this.mr==null) { 
    110       logger.error(" message routers must be set  before calling oai configure"); 
     110      logger.error(" message routers must be set before calling oai configure"); 
    111111      return false; 
    112112    } 
     
    157157      if (!name.equals("")) { 
    158158        this.super_coll_data.put(name, super_coll); 
    159         logger.error("adding in super coll "+name); 
     159        logger.info("adding in super coll "+name); 
    160160      } 
    161161    } 
     
    239239    // send to MR 
    240240    msg_node = mr.process(message); 
    241     logger.error(XMLConverter.getPrettyString(msg_node)); 
     241    logger.info("*** " + XMLConverter.getPrettyString(msg_node)); 
    242242    NodeList response_list =  ((Element)msg_node).getElementsByTagName(GSXML.RESPONSE_ELEM); 
    243243    for (int c=0; c<response_list.getLength(); c++) { 
     
    245245      Element response = (Element)response_list.item(c); 
    246246      String coll_name = GSPath.getFirstLink(response.getAttribute(GSXML.FROM_ATT)); 
    247       logger.error("coll from response "+coll_name); 
     247      logger.info("*** coll from response "+coll_name); 
    248248      NodeList set_list = response.getElementsByTagName(OAIXML.SET); 
    249249      for (int j=0; j<set_list.getLength(); j++) { 
     
    251251    Element set = (Element)set_list.item(j); 
    252252    String set_spec = GSXML.getNodeText((Element)GSXML.getChildByTagName(set, OAIXML.SET_SPEC)); 
    253     logger.error("set spec = "+set_spec); 
     253    logger.info("*** set spec = "+set_spec); 
    254254    // this may change if we add site name back in 
    255255    // setSpecs will be collname or collname:subset or supercollname 
    256256    if (set_spec.indexOf(":")==-1 && ! set_spec.equals(coll_name)) { 
    257257      // it must be a super coll spec 
    258       logger.error("found super coll, "+set_spec); 
     258      logger.info("*** found super coll, "+set_spec); 
    259259      // check that it is a valid one from config 
    260260      if (this.has_super_colls == true && this.super_coll_data.containsKey(set_spec)) { 
    261261        Vector <String> subcolls = this.super_coll_map.get(set_spec); 
    262262        if (subcolls == null) { 
    263           logger.error("its new!!"); 
     263          logger.info("*** its new!!"); 
    264264          // not in there yet 
    265265          subcolls = new Vector<String>(); 
     
    267267          this.super_coll_map.put(set_spec, subcolls); 
    268268          // the first time a supercoll is mentioned, add into the set list 
    269           logger.error("finding the set info "+XMLConverter.getPrettyString(this.super_coll_data.get(set_spec))); 
     269          logger.info("*** finding the set info "+XMLConverter.getPrettyString(this.super_coll_data.get(set_spec))); 
    270270          listsets_element.appendChild(GSXML.duplicateWithNewName(listsets_doc, this.super_coll_data.get(set_spec), OAIXML.SET, true)); 
    271271        } 
     
    295295 
    296296    Element response = (Element) this.mr.process(mr_request_message); 
    297     logger.error("configure response = "+XMLConverter.getPrettyString(response)); 
     297    logger.info("*** configure response = "+XMLConverter.getPrettyString(response)); 
    298298  } 
    299299  /** process using strings - just calls process using Elements */ 
     
    319319   */ 
    320320  public Node process(Node message_node) { 
    321     logger.error("OAIReceptionist received request"); 
     321    logger.info("*** OAIReceptionist received request"); 
    322322 
    323323    Element message = GSXML.nodeToElement(message_node); 
    324     logger.error(XMLConverter.getString(message)); 
     324    logger.info("*** " + XMLConverter.getString(message)); 
    325325 
    326326    // check that its a correct message tag 
     
    395395    ArrayList<String> param_list = new ArrayList<String>(param_map.keySet()); 
    396396    for(int i=0; i<param_list.size(); i++) { 
    397       logger.error("param, key =  "+param_list.get(i)+", value = "+param_map.get(param_list.get(i))); 
     397      logger.info("*** param, key =  "+param_list.get(i)+", value = "+param_map.get(param_list.get(i))); 
    398398      if (valid_strs.contains(param_list.get(i)) == false) { 
    399399        return false; 
     
    616616 
    617617      Element result = (Element)mr.process(mr_msg); 
    618       logger.error(verb+ " result for coll "+current_coll); 
    619       logger.error(XMLConverter.getPrettyString(result)); 
     618      logger.info("*** " + verb+ " result for coll "+current_coll); 
     619      logger.info("*** " + XMLConverter.getPrettyString(result)); 
    620620      if (result == null) { 
    621621    logger.info("message router returns null"); 
     
    665665        // we have finished one collection and there are no more collection 
    666666        // if we need to send a resumption token (in this case, only because we started with one, then it will be empty 
    667         logger.error("at end of list, need empty result token"); 
     667        logger.info("*** at end of list, need empty result token"); 
    668668        empty_result_token = true; 
    669669      } 
     
    692692      // we need a resumption token 
    693693      if (empty_result_token) { 
    694     logger.error("have empty result token"); 
     694    logger.info("*** have empty result token"); 
    695695    token = ""; 
    696696      } else {