Skip to content

Commit 7c70976

Browse files
author
Vladimir Kotal
authored
make the output when scanning/listing repositories a bit more verbose (#2374)
1 parent 74755c4 commit 7c70976

File tree

1 file changed

+4
-4
lines changed
  • opengrok-indexer/src/main/java/org/opengrok/indexer/index

1 file changed

+4
-4
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/Indexer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,10 +947,10 @@ public void prepareIndexer(RuntimeEnvironment env,
947947

948948
if (searchRepositories || listRepoPaths || !zapCache.isEmpty()) {
949949
LOGGER.log(Level.INFO, "Scanning for repositories...");
950-
long start = System.currentTimeMillis();
950+
Statistics stats = new Statistics();
951951
env.setRepositories(env.getSourceRootPath());
952-
long time = (System.currentTimeMillis() - start) / 1000;
953-
LOGGER.log(Level.INFO, "Done scanning for repositories ({0}s)", time);
952+
stats.report(LOGGER, String.format("Done scanning for repositories, found %d repositories",
953+
env.getRepositories().size()));
954954

955955
if (listRepoPaths || !zapCache.isEmpty()) {
956956
List<RepositoryInfo> repos = env.getRepositories();
@@ -963,7 +963,7 @@ public void prepareIndexer(RuntimeEnvironment env,
963963
System.out.println("Repositories in " + prefix + ":");
964964
for (RepositoryInfo info : env.getRepositories()) {
965965
String dir = info.getDirectoryName();
966-
System.out.println(dir.substring(prefix.length()));
966+
System.out.println(String.format("%s (%s)", dir.substring(prefix.length()), info.getType()));
967967
}
968968
}
969969
if (!zapCache.isEmpty()) {

0 commit comments

Comments
 (0)