Fix log files not being compressed when running in a web container

When the log file compressor task was introduced, the only log file in
the review_site/logs folder at that time was error_log. It made sense to
not schedule that task when running in a web container because error_log
doesn't exist in that case.

Since then, many other logs were added and they end up in
review_site/logs folder even if you run in a web container (sshd_log,
replication_log, gc_log,...).

Change-Id: Ic2ac866660798b56e481c4d169233ca393d74810
This commit is contained in:
Hugo Arès 2016-08-17 13:29:15 -04:00
parent 4e8744ecee
commit 1b5c946d7e

View File

@ -26,6 +26,7 @@ import com.google.gerrit.httpd.plugins.HttpPluginModule;
import com.google.gerrit.lifecycle.LifecycleManager;
import com.google.gerrit.lifecycle.LifecycleModule;
import com.google.gerrit.lucene.LuceneIndexModule;
import com.google.gerrit.pgm.util.LogFileCompressor;
import com.google.gerrit.reviewdb.client.AuthType;
import com.google.gerrit.server.account.InternalAccountDirectory;
import com.google.gerrit.server.cache.h2.DefaultCacheFactory;
@ -288,6 +289,7 @@ public class WebAppInitializer extends GuiceServletContextListener
private Injector createSysInjector() {
final List<Module> modules = new ArrayList<>();
modules.add(new LogFileCompressor.Module());
modules.add(new WorkQueue.Module());
modules.add(new ChangeHookRunner.Module());
modules.add(new ReceiveCommitsExecutorModule());