Bug 1686

Summary: DOMConfigurator.configureAndWatch is broken - fix is simple
Product: Log4j - Now in Jira Reporter: rknight
Component: ConfiguratorAssignee: log4j-dev <log4j-dev>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P5    
Version: 1.1beta   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description rknight 2001-05-09 11:50:58 UTC
configureAndWatch does not close the configuration file making it impossible to 
change while running. The fix is as follows:
 public
  void doConfigure(String filename, Hierarchy hierarchy) {
    FileInputStream fis = null;
    try {
      fis = new FileInputStream(filename);
      doConfigure(fis, hierarchy);
    } catch(IOException e) {
      LogLog.error("Could not open ["+filename+"].", e);
    } finally {
      if (fis != null) {
        fis.close();
      }
    }
  }
Comment 1 Mathias Bogaert 2001-05-16 15:08:24 UTC
Fixed in 1.1b7! Thanks for the report!