- Timestamp:
- 2006-10-17T15:52:42+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
r10093 r13124 36 36 import java.util.Locale; 37 37 38 import org.apache.log4j.*; 39 38 40 /** 39 41 * A Services class for building collections … … 46 48 extends ServiceRack { 47 49 50 static Category logger = Category.getInstance(org.greenstone.gsdl3.service.GS2Construct.class.getName()); 51 48 52 // services offered 49 53 private static final String NEW_SERVICE = "NewCollection"; … … 166 170 GS2PerlListener listener = (GS2PerlListener)this.listeners.get(id); 167 171 if (listener==null) { 168 System.err.println("somethings gone wrong, couldn't find the listener");172 logger.error("somethings gone wrong, couldn't find the listener"); 169 173 status.setAttribute(GSXML.STATUS_ERROR_CODE_ATT, Integer.toString(GSStatus.ERROR)); 170 174 return response; … … 217 221 if (get_status_only) { 218 222 // at the moment, delete is synchronous. but it may take ages so should do the command in another thread maybe? in which case we will want to ask for status 219 System.err.println("had a status request for delete - this shouldn't happen!!");223 logger.error("had a status request for delete - this shouldn't happen!!"); 220 224 //t = this.doc.createTextNode(""); 221 225 //status.appendChild(t); … … 267 271 if (get_status_only) { 268 272 // reload is synchronous - this makes no sense 269 System.err.println("had a status request for reload - this shouldn't happen!!");273 logger.error("had a status request for reload - this shouldn't happen!!"); 270 274 //t = this.doc.createTextNode(""); 271 275 //status.appendChild(t); … … 300 304 command.setAttribute(GSXML.TYPE_ATT, GSXML.SYSTEM_TYPE_ACTIVATE); 301 305 } else { 302 System.err.println("invalid action name passed to systemRequest:"+action_name);306 logger.error("invalid action name passed to systemRequest:"+action_name); 303 307 return; 304 308 } … … 330 334 } 331 335 332 System.out.println("configuring GS2Construct");336 logger.info("configuring GS2Construct"); 333 337 334 338 Element e = null; … … 427 431 coll_name = (String)params.get(COL_PARAM); 428 432 } 429 System.err.println("Coll name = "+coll_name);433 logger.error("Coll name = "+coll_name); 430 434 // makes a paramList of the relevant params 431 435 Element other_params = extractOtherParams(params, type); … … 471 475 File collectDir = new File(GSFile.collectDir(this.site_home)); 472 476 if (!collectDir.exists()) { 473 System.err.println("couldn't find collect dir: "+collectDir.toString());477 logger.error("couldn't find collect dir: "+collectDir.toString()); 474 478 return null; 475 479 } 476 System.out.println("GS2Construct: reading thru directory "+collectDir.getPath()+" to find collections.");480 logger.info("GS2Construct: reading thru directory "+collectDir.getPath()+" to find collections."); 477 481 File[] contents = collectDir.listFiles(); 478 482 int num_colls=0;
Note:
See TracChangeset
for help on using the changeset viewer.