use log4j in pdb-ui
This commit is contained in:
@@ -11,7 +11,6 @@ import java.util.Optional;
|
||||
import java.util.Spliterator;
|
||||
import java.util.Spliterators;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
@@ -23,9 +22,11 @@ import org.lucares.pdb.api.Entry;
|
||||
import org.lucares.pdb.api.GroupResult;
|
||||
import org.lucares.pdb.api.Result;
|
||||
import org.lucares.pdb.api.Tags;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
private static final Logger LOGGER = Logger.getLogger(PerformanceDb.class.getCanonicalName());
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(PerformanceDb.class);
|
||||
|
||||
private final TagsToFile tagsToFile;
|
||||
|
||||
@@ -84,7 +85,7 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
if (count % blocksize == 0) {
|
||||
final long end = System.nanoTime();
|
||||
final double duration = (end - start) / 1_000_000.0;
|
||||
LOGGER.info("inserting the last " + blocksize + " took " + duration + " ms; " + Stats.duration
|
||||
LOGGER.debug("inserting the last " + blocksize + " took " + duration + " ms; " + Stats.duration
|
||||
+ "ms of " + Stats.count + " operations. total entries: " + count / 1_000_000.0
|
||||
+ " million");
|
||||
|
||||
@@ -107,7 +108,7 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
LOGGER.info("Thread was interrupted. Aborting exectution.");
|
||||
} finally {
|
||||
tagsToFile.flush();
|
||||
LOGGER.info("flushed all files.");
|
||||
LOGGER.debug("flushed all files.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +160,7 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
try {
|
||||
iterator.close();
|
||||
} catch (final RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.info("runtime exception while closing iterator", e);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
|
||||
@@ -9,5 +9,5 @@ appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%t] %c
|
||||
|
||||
|
||||
|
||||
rootLogger.level = trace
|
||||
rootLogger.appenderRef.stdout.ref = STDOUT
|
||||
rootLogger.level = info
|
||||
rootLogger.appenderRef.stdout.ref = STDOUT
|
||||
|
||||
Reference in New Issue
Block a user