Add logging to CleanupTask
The code for the CleanupTask in the HA-plugin contained logging. These
logging statements are now also implemented here.
Change-Id: Iba03e51fcfba421b93b6e07d1298e2cb121c18f9
diff --git a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCacheCleaner.java b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCacheCleaner.java
index 5c88f92..64d1e70 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCacheCleaner.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCacheCleaner.java
@@ -17,6 +17,7 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
+import com.google.common.flogger.FluentLogger;
import com.google.gerrit.extensions.annotations.PluginName;
import com.google.gerrit.extensions.events.LifecycleListener;
import com.google.gerrit.server.git.WorkQueue;
@@ -34,6 +35,7 @@
private ScheduledFuture<?> scheduledCleanupTask;
static class CleanupTask implements Runnable {
+ private static final FluentLogger log = FluentLogger.forEnclosingClass();
private final FlatFileWebSessionCache flatFileWebSessionCache;
private final String pluginName;
@@ -45,7 +47,9 @@
@Override
public void run() {
+ log.atInfo().log("Cleaning up expired file based websessions...");
flatFileWebSessionCache.cleanUp();
+ log.atInfo().log("Cleaning up expired file based websessions...Done");
}
@Override