Fix replication_log no longer logging after plugin reload
ReplicationLogFile uses the LifecycleListener start and stop methods to
create and remove the file appender. The issue is that gerrit load the
new plugin and then unload the old one when a plugin is reloaded so
because loggers are static, the unload of the old plugin was removing
the appender just created by the new plugin.
Only remove the appender when the stop method is called during a server
shutdown and also only create the appender the first time the start
method is called.
(cherry picked from commit 52e48e3ce1eea6f24926dd6a2928bb0bb080e3f3)
1 file changed