You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/03/02 06:38:55 UTC
DO NOT REPLY [Bug 52808] New: Creating HSSFWorkbook instance resets
log4j log level to WARN
https://issues.apache.org/bugzilla/show_bug.cgi?id=52808
Bug #: 52808
Summary: Creating HSSFWorkbook instance resets log4j log level
to WARN
Product: POI
Version: 3.7
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: srihari.ravi@gmail.com
Classification: Unclassified
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).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 52808] Creating HSSFWorkbook instance resets log4j
log level to WARN
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52808
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
OS/Version| |All
--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2012-03-02 12:36:01 UTC ---
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
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 52808] Creating HSSFWorkbook instance resets log4j
log level to WARN
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52808
Ravi <sr...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |INVALID
--- Comment #2 from Ravi <sr...@gmail.com> 2012-03-05 05:26:58 UTC ---
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!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org