Skip to content

Commit

Permalink
fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavis95 committed May 9, 2022
1 parent c2ef4a6 commit 907c683
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static void writeOutput(String recordsFilename, String index, String q, i
workPool.searchAll(zuliaQuery, queryResult -> {

long totalHits = queryResult.getTotalHits();
LOG.info("Found <" + totalHits + "> for index <" + index + ">");

queryResult.getDocuments().forEach(doc -> {
try {
Expand All @@ -68,8 +67,9 @@ public static void writeOutput(String recordsFilename, String index, String q, i
fileWriter.write(doc.toJson());
fileWriter.write(System.lineSeparator());

if (count.incrementAndGet() % 1000 == 0) {
LOG.info("So far written <" + count + "> of <" + totalHits + ">");
int c = count.incrementAndGet();
if (c % 1000 == 0) {
LOG.info("So far written <" + c + "> of <" + totalHits + ">");
}

}
Expand Down

0 comments on commit 907c683

Please sign in to comment.