Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-428

Logger allows TRACE messages when reset to DEBUG

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 0.9.16
    • None
    • None
    • None
    • SLF4J 1.5.6 and Logback 0.9.15

    Description

      When reconfiguring the LoggerContext, TRACE messages are logged even when the Logger level is set to DEBUG.

      As Ceki pointed out, the following test reproduces the issue.

      @Test
      public void levelResetTest()

      { LoggerContext loggerContext = new LoggerContext(); Logger root = loggerContext.getLogger(LoggerContext.ROOT_NAME); root.setLevel(Level.TRACE); assertTrue(root.isTraceEnabled()); loggerContext.reset(); //Logger is reset to DEBUG assertFalse(root.isTraceEnabled()); <-- assertion fails assertTrue(root.isDebugEnabled()); }

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            adruch Andrew Ruch
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: