use logger instead of sysout

This commit is contained in:
2023-02-11 16:13:17 +01:00
parent e79536cf00
commit 728fe1df78

View File

@@ -18,6 +18,8 @@ import org.lucares.pdb.map.PersistentMap;
import org.lucares.pdb.map.PersistentMap.EncoderDecoder;
import org.lucares.utils.Preconditions;
import org.lucares.utils.byteencoder.VariableByteEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This index supports query completion.
@@ -144,6 +146,9 @@ import org.lucares.utils.byteencoder.VariableByteEncoder;
*
*/
public class QueryCompletionIndex implements AutoCloseable {
private static final Logger LOGGER = LoggerFactory.getLogger(QueryCompletionIndex.EncoderTwoTags.class);
private static final class TwoTags {
private final Tag tagA;
private final Tag tagB;
@@ -334,8 +339,8 @@ public class QueryCompletionIndex implements AutoCloseable {
fieldIndex.putValue(partitionId, stringCompressor.getKeyAsString(tag), Empty.INSTANCE);
}
final double d = (System.nanoTime() - start) / 1_000_000.0;
if (d > 10) {
System.out.println(" addTags: " + d + " ms");
if (d > 20) {
LOGGER.trace(" addTags: {} ms", d);
}
}