- 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/util/GSFile.java
r10899 r13124 32 32 import java.util.ArrayList; 33 33 34 import org.apache.log4j.*; 35 34 36 /** 35 37 * GSFile - utility class for Greenstone. … … 44 46 45 47 public class GSFile { 48 49 static Category logger = Category.getInstance(org.greenstone.gsdl3.util.GSFile.class.getName()); 46 50 47 51 /** site config file path */ … … 312 316 data = readFile(in_filename); 313 317 } catch (Exception e) { 314 System.err.println("GSFile.base64EncodeFromFile:couldn't read the file");318 logger.error("couldn't read the file"); 315 319 } 316 320 String encodedString = Base64.encode(data); … … 326 330 327 331 } catch (Exception e) { 328 System.err.println("GSFile.base64DecodeToFile:file opening/closing errors"+e.getMessage());332 logger.error("file opening/closing errors"+e.getMessage()); 329 333 return false; 330 334 } … … 369 373 public static boolean copyFile(File source, File destination) { 370 374 if (!source.isFile()) { 371 System.err.println("GSFile.copyFile(): "+source.getPath()+" is not a file!");375 logger.error(source.getPath()+" is not a file!"); 372 376 return false; 373 377 } … … 383 387 out.close(); 384 388 } catch (Exception e) { 385 System.err.println("GSFile.copyFile():something went wrong copying "+source.getPath()+" to "+destination.getPath());386 System.err.println("Exception: "+e.getMessage());389 logger.error("something went wrong copying "+source.getPath()+" to "+destination.getPath()); 390 logger.error("Exception: "+e.getMessage()); 387 391 return false; 388 392 } … … 428 432 input[i].delete(); 429 433 } catch (Exception e) { 430 System.err.println("GSFile.moveDirectory:exception: "+e.getMessage());434 logger.error("exception: "+e.getMessage()); 431 435 return false; 432 436 }
Note:
See TracChangeset
for help on using the changeset viewer.