[logback-dev] [JIRA] Created: (LBCLASSIC-204) A logger's appenders are not cleared when configuring using XML configuration file (as the manual says)
Richard Fearn (JIRA)
noreply-jira at qos.ch
Tue Apr 20 12:43:16 CEST 2010
A logger's appenders are not cleared when configuring using XML configuration file (as the manual says)
-------------------------------------------------------------------------------------------------------
Key: LBCLASSIC-204
URL: http://jira.qos.ch/browse/LBCLASSIC-204
Project: logback-classic
Issue Type: Bug
Components: joran
Affects Versions: 0.9.15
Reporter: Richard Fearn
Assignee: Logback dev list
Priority: Minor
The Logback manual says:
"The <logger> element may contain zero or more <appender-ref> elements; each appender thus referenced is added to the named logger. It is important to keep mind that each named logger that is declared with a <logger> element first has all its appenders removed and only then are the referenced appenders attached to it. In particular, if there are no appender references, then the named logger will lose all its appenders. "
However this doesn't seem to be the case. Our scenario is that we reset a context, configure it using one configuration file, then configure it using a second configuration file.
This can be reproduced by configuring the same context with the same configuration file twice. The appenders added to a logger the first time are not cleared before adding them a second time, resulting in duplicate appenders.
The latest version of LoggerAction and AppenderRefAction don't seem to have anything in them that would clear the appenders, either.
--
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