Bug 1686 - DOMConfigurator.configureAndWatch is broken - fix is simple
DOMConfigurator.configureAndWatch is broken - fix is simple
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Configurator
1.1beta
PC All
: P5 minor
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
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!