replace sysout with logger

This commit is contained in:
2017-03-19 09:20:00 +01:00
parent 9ab5d76d93
commit ea905c2315
2 changed files with 15 additions and 3 deletions

View File

@@ -29,8 +29,12 @@ import org.lucares.pdb.plot.api.PlotSettings;
import org.lucares.performance.db.FileUtils;
import org.lucares.performance.db.Grouping;
import org.lucares.performance.db.PerformanceDb;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Plotter {
private static final Logger LOGGER = LoggerFactory.getLogger(Plotter.class);
private static final Logger METRICS_LOGGER = LoggerFactory.getLogger("org.lucares.metrics.plotter");
private final PerformanceDb db;
private final Path tmpBaseDir;
@@ -134,6 +138,8 @@ public class Plotter {
while (dataSeries.size() > plotSettings.getLimit()) {
dataSeries.remove(plotSettings.getLimit());
}
} else {
dataSeries.sort(getDataSeriesComparator(Limit.MOST_VALUES));
}
}
@@ -184,7 +190,7 @@ public class Plotter {
plotSettings.setGroupBy(Grouping.NO_GROUPING);
final File image = plotter.plot(plotSettings);
System.out.println("plotted image: " + image);
LOGGER.trace("plotted image: {}", image);
}
} finally {
@@ -225,7 +231,7 @@ public class Plotter {
}
}
System.out.println("wrote " + count + " values to csv in: " + (System.nanoTime() - start) / 1_000_000.0 + "ms");
METRICS_LOGGER.debug("wrote {} values to csv in: {}ms", count, (System.nanoTime() - start) / 1_000_000.0);
return new CsvSummary(count, maxDate, minDate);
}
}