Ignore:
Timestamp:
2006-10-17T15:52:42+13:00 (18 years ago)
Author:
shaoqun
Message:

added the code to use log4j and replace system.out or system.err to logger.info or logger.error respectively. The commented out output has been replaced with logger.debug. The log file is in web/logs/greenstone.log

File:
1 edited

Legend:

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

    r11265 r13124  
    4242import java.util.ArrayList;
    4343
     44import org.apache.log4j.*;
     45
    4446/** Implements the generic retrieval and classifier services for GS2
    4547 * collections.
     
    5254    extends AbstractDocumentRetrieve {
    5355
     56      static Category logger = Category.getInstance(org.greenstone.gsdl3.service.AbstractGS2DocumentRetrieve.class.getName());
     57
    5458    //    protected static final String EXTLINK_PARAM = "ext"; here or in base??   
    5559    protected String index_stem = null;
     
    7680    }
    7781   
    78     System.out.println("Configuring AbstractGS2DocumentRetrieve...");
     82    logger.info("Configuring AbstractGS2DocumentRetrieve...");
    7983    //this.config_info = info;
    8084   
     
    8589    }
    8690    if (this.index_stem == null || this.index_stem.equals("")) {
    87         System.err.println("AbstractGS2DocumentRetrieve.configure(): indexStem element not found, stem will default to collection name");
     91        logger.error("AbstractGS2DocumentRetrieve.configure(): indexStem element not found, stem will default to collection name");
    8892        this.index_stem = this.cluster_name;
    8993    }
     
    9296    String gdbm_db_file = GSFile.GDBMDatabaseFile(this.site_home, this.cluster_name, this.index_stem);
    9397    if (!this.gdbm_src.openDatabase(gdbm_db_file, GDBMWrapper.READER)) {
    94         System.err.println("AbstractGS2DocumentRetrieve Error: Could not open GDBM database!");
     98        logger.error("Could not open GDBM database!");
    9599        return false;
    96100    }
Note: See TracChangeset for help on using the changeset viewer.