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: Logback dev list
Priority: Minor
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
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev