[logback-dev] [JIRA] Resolved: (LBCLASSIC-109) Logger allows TRACE messages when reset to DEBUG

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Tue Jul 21 22:09:11 CEST 2009


     [ http://jira.qos.ch/browse/LBCLASSIC-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ceki Gulcu resolved LBCLASSIC-109.
----------------------------------

    Fix Version/s: 0.9.16
       Resolution: Fixed

Fixed in revision 2169. See also http://svn.qos.ch/viewvc?view=rev&revision=2169

> Logger allows TRACE messages when reset to DEBUG
> ------------------------------------------------
>
>                 Key: LBCLASSIC-109
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-109
>             Project: logback-classic
>          Issue Type: Bug
>         Environment: SLF4J 1.5.6 and Logback 0.9.15
>            Reporter: Andrew Ruch
>            Assignee: Ceki Gulcu
>            Priority: Minor
>             Fix For: 0.9.16
>
>
> 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());
>   }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list