Changeset 18770

Show
Ignore:
Timestamp:
24.03.2009 16:03:39 (10 years ago)
Author:
ak19
Message:

On error, the correct location of the logs folder needs to be displayed which is different between GS2 and GS3, so this is set by the subclass constructors.

Location:
greenstone3/trunk/src/java/org/greenstone/server
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/server/BaseServer.java

    r18711 r18770  
    3636    protected boolean configure_required_ = true; 
    3737    protected String gsdl_home; 
     38    protected String logs_folder; 
    3839    protected BaseServerControl server_control_;     
    3940     
    40     protected BaseServer(String gsdl_home, String lang, String build_properties_path) 
     41    protected BaseServer(String gsdl_home, String lang, String build_properties_path, String logs) 
    4142    { 
    4243    this.gsdl_home = gsdl_home; 
     44    // expand the relative location of the logs folder 
     45    this.logs_folder = this.gsdl_home+File.separator+logs; 
    4346 
    4447    // make sure we write to the correct logs 
     
    134137     
    135138    protected void recordError(String message){ 
    136         message = dictionary.get("ServerControl.Error",new String[]{message,gsdl_home}); 
     139        message = dictionary.get("ServerControl.Error",new String[]{message,logs_folder}); 
    137140    server_control_.displayMessage(message); 
    138141    logger_.error(dictionary.get("ServerControl.Failed",new String[]{message})); 
     
    141144 
    142145    protected void recordError(String message, Exception e){ 
    143         message = dictionary.get("ServerControl.Error",new String[]{message,gsdl_home}); 
     146        message = dictionary.get("ServerControl.Error",new String[]{message,logs_folder}); 
    144147    server_control_.displayMessage(message); 
    145148    logger_.error(dictionary.get("ServerControl.Failed",new String[]{message}),e); 
  • greenstone3/trunk/src/java/org/greenstone/server/Server2.java

    r18679 r18770  
    1919    { 
    2020    super(gsdl2_home, lang, 
    21           gsdl2_home+File.separator+"lib"+File.separator+"java"+File.separator+"build.properties");  
     21          gsdl2_home+File.separator+"lib"+File.separator+"java"+File.separator+"build.properties", 
     22          "etc"+File.separator+"logs-gsi");  
    2223 
    2324    Property = new Server2Property(); 
  • greenstone3/trunk/src/java/org/greenstone/server/Server3.java

    r18670 r18770  
    1313    public Server3(String gsdl3_src_home, String lang) 
    1414    { 
    15     super(gsdl3_src_home,lang, gsdl3_src_home+File.separatorChar+"build.properties"); 
     15    super(gsdl3_src_home,lang, gsdl3_src_home+File.separatorChar+"build.properties", "logs"); 
    1616 
    1717    Property = new Server3Property();