I am using POI's HSSF to read data from an MS excel sheet. I also use log4j in my project for logging. Here is what I do in my project: 1. Initialize logging (log level is set to INFO in log4j.properties) 2. Do stuff: log.info works fine here 3. Read an excel sheet using HSSF 4. Do stuff: log.info doesn't show output, log.warn & log.error work fine however By reinitializing logging (reexecuting step 1 above) after step 3, log.info works fine again. This issue is observed in build 1.7 (poi-3.7-20101029.jar) and also in the latest 1.8 beta (poi-3.8-beta5-20111217.jar).
I can't reproduce it. Can you narrow it down to a simple isolated test so that we can confirm the problem? POI does not use the log4j framework directly but can be configured to delegate logging to log4j via Apache Commons Logging. Did you set it so ? Even if you did, I don't see how it can interfere with existing log4j setup. Check that you don't have multiple log4.properties in the classpath. Try to track the code that resets log4. The simplest way is to set a breakpoint inside log4 and see what place is actually calling it. I will very surprised if it is POI. Yegor
Yeah, I tried again with a simple project without any complexity. I did not see the issue. In the earlier project I used this, there was another application (using log4j) JAR being used. It is a bit strange, but the logging level gets reset to this other application's log level only after HSSF code is invoked. I will debug further and let you know if I feel it is a bug with HSSF. I am closing this bug. Thanks!