Trailing blank following log property level causing problems with IBM Java 6
----------------------------------------------------------------------------
Key: UIMA-1708
URL: https://issues.apache.org/jira/browse/UIMA-1708
Project: UIMA
Issue Type: Bug
Components: Build, Packaging and Test, Core Java Framework
Reporter: Marshall Schor
Assignee: Marshall Schor
Priority: Minor
Fix For: 2.3
Well, you'll have trouble believing this one. We had a logging issue which we
finally isolated to only failing on IBM Java 6, not on IBM Java5 or on Sun
Javas. The issue was that the setting of the logger, done by uncommenting the
last line in the distributed Logger.properties file (it's in uimaj-distr,
/src/main/properties/Logger.properties) is written as
{quote}
\# To set the logging level for the UIMA framework itself, specify:
\# org.apache.uima.level = ALL
{quote}
where there is a "blank" following the word "ALL".
The properties file is read using the Properties.load method, which preserves
that trailing blank. This makes the setting for the level not compare equal to
any of the defined levels. In most other Java impls, the value of the level is
"trimmed" before the compare, but not in IBM's Java 6 SR 3 impl.
You can see this for yourself, with a tiny test case:
{code}
public static void main(String[] args) {
Logger log = Logger.getLogger("org.apache.uima");
log.log(Level.FINEST, "Test");
log.log(Level.INFO, "info");
}
{code}
Set up a logger.properties file with the org.apache.uima level setting at
FINEST with a trailing blank, and try on the various Javas...
Fix for now: change our default properties file to remove the trailing blank on
the commented-out line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.