[
https://issues.apache.org/jira/browse/LOG4J2-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers resolved LOG4J2-190.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.0-beta5
Assignee: Ralph Goers
Patch applied in revision 1463400. Please verify and close.
> Bug in BaseConfiguration.addLoggerAppender(..)
> ----------------------------------------------
>
> Key: LOG4J2-190
> URL: https://issues.apache.org/jira/browse/LOG4J2-190
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0-beta4
> Reporter: Werner
> Assignee: Ralph Goers
> Fix For: 2.0-beta5
>
>
> I add and remove dynamically appenders to loggers (Logger.addAppender)
> But when removing an error occurs.
> The reason is that the appenders are registered with the logger name in the
> list of appenders.
> proposal for solution:
> BaseConfiguration.java
> public synchronized void addLoggerAppender(final
> org.apache.logging.log4j.core.Logger logger,
> final Appender appender) {
> final String name = logger.getName();
> //appenders.putIfAbsent(name, appender); ==> it's the name of the
> logger
> appenders.putIfAbsent(appender.getName(), appender);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]