Ignore:
Timestamp:
2003-09-01T15:33:58+12:00 (21 years ago)
Author:
kjdon
Message:

tidying up println stuff

Location:
trunk/gsdl3/src/java/org/greenstone/gsdl3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r4986 r5400  
    4848    super.init(config);
    4949
     50    // disable preferences - does this work anyway??
     51    //System.setProperty("java.util.prefs.PreferencesFactory", "org.greenstone.gsdl3.util.DisabledPreferencesFactory");
     52
    5053    String library_name = config.getInitParameter(GSConstants.LIBRARY_NAME);
    5154    String gsdl3_home = config.getInitParameter(GSConstants.GSDL3_HOME);
     
    8689        message_router = (MessageRouter)Class.forName("org.greenstone.gsdl3.core."+mr_name).newInstance();
    8790        } catch (Exception e) { // cant use this new one, so use normal one
    88         System.out.println("LibraryServlet configure exception when trying to use a new MessageRouter "+mr_name+": "+e.getMessage());
     91        System.err.println("LibraryServlet configure exception when trying to use a new MessageRouter "+mr_name+": "+e.getMessage());
    8992        e.printStackTrace();
    9093        message_router = new MessageRouter();
     
    104107        this.recept = (Receptionist)Class.forName("org.greenstone.gsdl3.core."+recept_name).newInstance();
    105108        } catch (Exception e) { // cant use this new one, so use normal one
    106         System.out.println("LibraryServlet configure exception when trying to use a new Receptionist "+recept_name+": "+e.getMessage());
     109        System.err.println("LibraryServlet configure exception when trying to use a new Receptionist "+recept_name+": "+e.getMessage());
    107110        e.printStackTrace();
    108111        this.recept = new DefaultReceptionist();
     
    120123        this.params = (GSParams)Class.forName("org.greenstone.gsdl3.util."+params_name).newInstance();
    121124        } catch (Exception e) {
    122         System.out.println("LibraryServlet configure exception when trying to use a new params thing "+params_name+": "+e.getMessage());
     125        System.err.println("LibraryServlet configure exception when trying to use a new params thing "+params_name+": "+e.getMessage());
    123126        e.printStackTrace();
    124127        this.params = new GSParams();
     
    136139   
    137140    HttpSession session = request.getSession(true);
    138 
    139     // print them out to test it
    140 //      Enumeration stored_names = session.getAttributeNames();
    141 //      System.out.println("session values are:");
    142 //      while (stored_names.hasMoreElements()) {
    143 //          String name = (String)stored_names.nextElement();
    144 //          System.out.println("stored "+name+":" +session.getAttribute(name));
    145 //      }
    146141
    147142    request.setCharacterEncoding("UTF-8");
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/collection/Collection.java

    r4942 r5400  
    6969   
    7070    if (this.site_home == null || this.cluster_name== null) {
    71         System.err.println("site_home and collection_name must be set before configure called!");
     71        System.err.println("Collection: site_home and collection_name must be set before configure called!");
    7272        return false;
    7373    }
     
    9797   
    9898    if (!coll_config_file.exists()) {
    99         System.err.println(coll_config_file+" does not exist");
    100         System.err.println("couldn't configure collection: "+this.cluster_name);
     99        System.err.println("Collection: couldn't configure collection: "+this.cluster_name+", "+coll_config_file+" does not exist");
    101100        return null;
    102101    }
     
    114113    File build_config_file = new File(GSFile.collectionBuildConfigFile(this.site_home, this.cluster_name));
    115114    if (!build_config_file.exists()) {
    116         System.err.println(build_config_file+" does not exist");
    117         System.err.println("couldn't configure collection: "+this.cluster_name);
     115        System.err.println("Collection: couldn't configure collection: "+this.cluster_name+", "+coll_config_file+" does not exist");
    118116        return null;
    119117    }
     
    171169    }
    172170   
    173     System.err.println("ServiceCluster: cant process system request, configure "+subset);
     171    System.err.println("Collection: cant process system request, configure "+subset);
    174172    return false;
    175173    }
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java

    r5151 r5400  
    123123
    124124    if (this.site_home == null || this.cluster_name== null) {
    125         System.err.println("site_home and cluster_name must be set before configure called!");
     125        System.err.println("ServiceCluster: site_home and cluster_name must be set before configure called!");
    126126        return false;
    127127    }
     
    131131
    132132    if (!config_file.exists()) {
    133         System.err.println(config_file+" does not exist");
    134         System.err.println("couldn't configure cluster: "+this.cluster_name);
     133        System.err.println("ServiceCluster: couldn't configure cluster: "+this.cluster_name +", "+config_file+" does not exist");
    135134        return false;
    136135    }
     
    154153        if (!addMetadata(meta_list)) {
    155154       
    156         System.err.println("couldn't configure the metadata");
     155        System.err.println("ServiceCluster: couldn't configure the metadata");
    157156        }
    158157    }
     
    163162        if (!addDisplayItems(display_list)) {
    164163       
    165         System.err.println("couldn't configure the display items");
     164        System.err.println("ServiceCluster: couldn't configure the display items");
    166165        }
    167166    }
     
    173172        // is this an error? could you ever have a service cluster
    174173        // without service racks???
    175         System.err.println("cluster has no service racks!!");
     174        System.err.println("ServiceCluster: cluster has no service racks!!");
    176175    } else {
    177176       
    178177        if (!configureServiceRack(service_rack_list, null)) {
    179         System.err.println("couldn't configure the  service racks!!");
     178        System.err.println("ServiceCluster: couldn't configure the  service racks!!");
    180179        return false;
    181180        }
     
    211210        }
    212211        String name = d.getAttribute(GSXML.NAME_ATT);
    213         System.out.println("adding display named "+name);
    214212        Element this_item = GSXML.getNamedElement(this.display_item_list, GSXML.DISPLAY_TEXT_ELEM, GSXML.NAME_ATT, name);
    215213        if (this_item==null) {
     
    241239    NodeList nodes = service_rack_list.getElementsByTagName(GSXML.SERVICE_CLASS_ELEM);
    242240    if (nodes.getLength()==0) {
    243         System.err.println("Cluster configuration error: cluster "+this.cluster_name+" has no service modules!");
     241        System.err.println("ServiceCluster configuration error: cluster "+this.cluster_name+" has no service modules!");
    244242        return false;
    245243    }
     
    469467            this.service_map.remove(module_name);
    470468            Element service_elem = GSXML.getNamedElement(this.service_list, GSXML.SERVICE_ELEM, GSXML.NAME_ATT, module_name);
    471             System.out.println("service list before: "+this.converter.getPrettyString(service_list));
    472             service_list.removeChild(service_elem);
    473             System.out.println("service list after: "+this.converter.getPrettyString(service_list));
    474            
     469            service_list.removeChild(service_elem);         
    475470            message = module_type+": "+module_name+" deactivated";
    476471        } else {
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r5260 r5400  
    211211            String namespace = name.substring(0, pos);
    212212            name = name.substring(pos+1);
    213             System.out.println("namespace = "+namespace+" name= "+name);
    214213            HashMap map = (HashMap)param_map.get(namespace);
    215214            if (map == null) {
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/Misc.java

    r4101 r5400  
    1313   
    1414    public static void printHash(HashMap map) {
    15     System.out.println("Map entries are :");
    1615    Set entries = map.entrySet();
    1716    Iterator i = entries.iterator();
     
    2019        String name = (String)m.getKey();
    2120        String value = (String)m.getValue();
    22         System.out.println(name+"="+value);
    2321    } 
    2422    }
Note: See TracChangeset for help on using the changeset viewer.