add special logger for throughput metrics

so that we can enable/disable it individually
This commit is contained in:
2017-03-18 10:20:14 +01:00
parent a01c8b3907
commit 16f9c92d13

View File

@@ -34,6 +34,7 @@ import com.fasterxml.jackson.databind.ObjectReader;
public class TcpIngestor implements AutoCloseable { public class TcpIngestor implements AutoCloseable {
private static final Logger LOGGER = LoggerFactory.getLogger(TcpIngestor.class); private static final Logger LOGGER = LoggerFactory.getLogger(TcpIngestor.class);
private static final Logger METRICS_LOGGER = LoggerFactory.getLogger("org.lucares.metrics.tcpIngestor");
public static final int PORT = 17347; public static final int PORT = 17347;
@@ -87,7 +88,7 @@ public class TcpIngestor implements AutoCloseable {
count++; count++;
if (count == 100000) { if (count == 100000) {
LOGGER.debug("reading {} took {} ms", count, duration); METRICS_LOGGER.debug("reading {} took {} ms", count, duration);
duration = 0.0; duration = 0.0;
count = 0; count = 0;
} }