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/GS2Browse.java

    r10651 r13124  
    3838import java.util.Iterator;
    3939
     40import org.apache.log4j.*;
     41
    4042/** Greenstone 2 collection classifier service
    4143 *
     
    4749    extends AbstractBrowse
    4850{
    49    
     51
     52     static Category logger = Category.getInstance(org.greenstone.gsdl3.service.GS2Browse.class.getName());
     53
    5054    protected GDBMWrapper gdbm_src = null;
    5155
     
    6771    }
    6872
    69     System.err.println("Configuring GS2Browse...");
     73    logger.info("Configuring GS2Browse...");
    7074    // the index stem is either specified in the config file or is  the collection name
    7175    Element index_stem_elem = (Element) GSXML.getChildByTagName(info, GSXML.INDEX_STEM_ELEM);
     
    8185    String gdbm_db_file = GSFile.GDBMDatabaseFile(this.site_home, this.cluster_name, index_stem);
    8286    if (!this.gdbm_src.openDatabase(gdbm_db_file, GDBMWrapper.READER)) {
    83         System.err.println("GS2Browse Error: Could not open GDBM database!");
     87        logger.error("Could not open GDBM database!");
    8488        return false;
    8589    }
Note: See TracChangeset for help on using the changeset viewer.