Bug 1686 - DOMConfigurator.configureAndWatch is broken - fix is simple
Summary: DOMConfigurator.configureAndWatch is broken - fix is simple
Status: RESOLVED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Configurator (show other bugs)
Version: 1.1beta
Hardware: PC All
: P5 minor
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-09 11:50 UTC by rknight
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!