SiteLibraryLoaderUtil: Add debug log of the loaded libraries
Change-Id: Ia0b6ba082db9992e5a8c307c262b7b97ff5238e4
This commit is contained in:
parent
f12e75f769
commit
1e85483efe
@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.common;
|
||||
|
||||
import static com.google.gerrit.common.FileUtil.lastModified;
|
||||
import static java.util.stream.Collectors.joining;
|
||||
|
||||
import com.google.common.annotations.GwtIncompatible;
|
||||
import com.google.common.collect.ComparisonChain;
|
||||
@ -35,12 +36,18 @@ public final class SiteLibraryLoaderUtil {
|
||||
|
||||
public static void loadSiteLib(Path libdir) {
|
||||
try {
|
||||
IoUtil.loadJARs(listJars(libdir));
|
||||
List<Path> jars = listJars(libdir);
|
||||
IoUtil.loadJARs(jars);
|
||||
log.debug("Loaded site libraries: {}", jarList(jars));
|
||||
} catch (IOException e) {
|
||||
log.error("Error scanning lib directory " + libdir, e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String jarList(List<Path> jars) {
|
||||
return jars.stream().map(p -> p.getFileName().toString()).collect(joining(","));
|
||||
}
|
||||
|
||||
public static List<Path> listJars(Path dir) throws IOException {
|
||||
DirectoryStream.Filter<Path> filter =
|
||||
new DirectoryStream.Filter<Path>() {
|
||||
|
Loading…
Reference in New Issue
Block a user