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

Logger allows TRACE messages when reset to DEBUG

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.16
    • Component/s: None
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: