swebb2066 opened a new pull request, #491: URL: https://github.com/apache/logging-log4cxx/pull/491
This PR addresses a race condition where an active thread sends an event to a Logger after the reconfiguration thread has removed all appenders but before the new appender list is established. The new *replaceAppender* methods block event producing threads while the list of appenders is updated. The modified test case [errorhandler test](https://github.com/apache/logging-log4cxx/compare/reconfiguration_synchronization?expand=1#diff-8d655beadcefc87795cfe34d8c7796085a484cb0b3ff8e5cc4d51d4145951ba3) previously used an invalid configuration to trigger the fallback handler. This fallback process (Installing the FALLBACK appender in place of the faulty PRIMARY appender) was happening during configuration, but the PRIMARY appender (with a NULL writer) was later being added to the root logger. After configuration the root logger had two appenders, one of which had a a NULL writer. I believe the intent of the errorhandler test is in checking the fallback handling on any error, not specifically a faulty configuration. The behaviour of Log4cxx when the configuration file is invalid should ideally be to leave the current configuration unchanged, as happens when the xml is not parsable. However doing this for other types of configuration errors is a larger job than I am attempting here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org