From 42494ce58a847ec5fdec7f3b66448fba29e88656 Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Tue, 2 May 2017 15:22:25 +0900 Subject: [PATCH] Improve logging --- src/main/scala/gitbucket/core/plugin/PluginRegistory.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala b/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala index bd0c3e214..a963f5e16 100644 --- a/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala +++ b/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala @@ -200,12 +200,14 @@ object PluginRegistry { using(fc.tryLock()){ lock => if(lock == null){ if(retry >= 3){ // Retry max 3 times - logger.info(s"Retire to load: ${from.getAbsolutePath}") + logger.info(s"Retire to install plugin: ${from.getAbsolutePath}") } else { + logger.info(s"Retry ${retry + 1} to install plugin: ${from.getAbsolutePath}") Thread.sleep(500) copyFile(from, to, retry + 1) } } else { + logger.info(s"Install plugin: ${from.getAbsolutePath}") FileUtils.copyFile(from, to) } } @@ -341,6 +343,7 @@ class PluginWatchThread(context: ServletContext) extends Thread with SystemSetti gitbucket.core.servlet.Database() withTransaction { session => logger.info("Reloading plugins...") PluginRegistry.reload(context, loadSystemSettings(), session.conn) + logger.info("Reloading finished.") } } detectedWatchKey.reset()