Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-1708

Trailing blank following log property level causing problems with IBM Java 6

    XMLWordPrintableJSON

Details

    Description

      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

      # To set the logging level for the UIMA framework itself, specify:
      # org.apache.uima.level = ALL

      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:

        public static void main(String[] args) {
          Logger log = Logger.getLogger("org.apache.uima");
          log.log(Level.FINEST, "Test");
          log.log(Level.INFO, "info");
        }
      

      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.

      Attachments

        Activity

          People

            schor Marshall Schor
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: