Log4j 2
  1. Log4j 2
  2. LOG4J2-517

Switch in log4j-1.2-api Category.getEffectiveLevel misses FATAL, OFF

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta9
    • Fix Version/s: 2.0-rc1
    • Component/s: log4j 1.2 emulation
    • Labels:
      None

      Description

      Current:

          public final Level getEffectiveLevel() {
              switch (logger.getLevel().getStandardLevel()) {
                  case TRACE:
                      return Level.TRACE;
                  case DEBUG:
                      return Level.DEBUG;
                  case INFO:
                      return Level.INFO;
                  case WARN:
                      return Level.WARN;
                  default:
                      return Level.ERROR;
              }
          }
      

      Should be:

          public final Level getEffectiveLevel() {
              switch (logger.getLevel().getStandardLevel()) {
                  case TRACE:
                      return Level.TRACE;
                  case DEBUG:
                      return Level.DEBUG;
                  case INFO:
                      return Level.INFO;
                  case WARN:
                      return Level.WARN;
                  case ERROR:
                      return Level.ERROR;
                  case FATAL:
                      return Level.FATAL;
                  default:
                      return Level.OFF;
              }
          }
      

        Activity

        Hide
        Remko Popma added a comment -

        Fixed in revision 1561715.

        Show
        Remko Popma added a comment - Fixed in revision 1561715.

          People

          • Assignee:
            Remko Popma
            Reporter:
            Remko Popma
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development