Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-53

jcl104-over-slf4j not recompiled with modified LocationAwareLogger

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Implementations
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

      Description

      Log level contstants was modified in LocationAwareLogger.java (see SLF4J-15). But jcl104-over-slf4j was not recompiled after that change. Because java compiler sometime puts constants into target method, there are sometime old values of these constants in jcl104-over-slf4j classes in http://www.slf4j.org/dist/slf4j-1.4.3.zip

      For example, in class org.apache.commons.logging.impl.SLF4JLocationAwareLog there is following method:

      public void warn(Object message)

      { logger.log(null, FQCN, LocationAwareLogger.WARN_INT, String.valueOf(message), null); }

      In current class it is compiled as:

      public void warn(Object message)

      { logger.log(null, FQCN, 2, String.valueOf(message), null); }

      because 2 was old value of LocationAwareLogger.WARN_INT. It results in following exception:

      java.lang.IllegalArgumentException: 2 not a valid level value
      at ch.qos.logback.classic.Logger.log(Logger.java:820)
      at org.apache.commons.logging.impl.SLF4JLocationAwareLog.warn(SLF4JLocat
      ionAwareLog.java:141)

      Perhaps all classes of sl4j needs recompilation.

        Attachments

          Activity

            People

            • Assignee:
              slf4j-dev SLF4J developers list
              Reporter:
              Filip.Jirsak Filip Jirsák
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: