*/
public static final int MINIMAL_LOG_REPORT_PERIOD = 500;
private static StatisticsCounters instanceHolder;
- private static final Logger LOGGER = LoggerFactory.getLogger(StatisticsCounters.class);
+ private static final Logger LOG = LoggerFactory.getLogger(StatisticsCounters.class);
private Timer logReporter;
private int logReportPeriod;
runCounting = false;
this.logReportPeriod = 0;
this.runLogReport = false;
- LOGGER.debug("StaticsCounters has been created");
+ LOG.debug("StaticsCounters has been created");
}
/**
return;
}
resetCounters();
- LOGGER.debug("Counting started...");
+ LOG.debug("Counting started...");
if(reportToLogs){
startLogReport(logReportDelay);
}
*/
public void stopCounting(){
runCounting = false;
- LOGGER.debug("Stop counting...");
+ LOG.debug("Stop counting...");
stopLogReport();
}
logReporter = new Timer("SC_Timer");
logReporter.schedule(new LogReporterTask(this), this.logReportPeriod, this.logReportPeriod);
runLogReport = true;
- LOGGER.debug("Statistics log reporter has been scheduled with period {} ms", this.logReportPeriod);
+ LOG.debug("Statistics log reporter has been scheduled with period {} ms", this.logReportPeriod);
}
/**
if(runLogReport){
if(logReporter != null){
logReporter.cancel();
- LOGGER.debug("Statistics log reporter has been canceled");
+ LOG.debug("Statistics log reporter has been canceled");
}
runLogReport = false;
}
for(CounterEventTypes cet : enabledCounters){
countersMap.get(cet).reset();
}
- LOGGER.debug("StaticsCounters has been reset");
+ LOG.debug("StaticsCounters has been reset");
}
@Override
@Override
public void run() {
for(CounterEventTypes cet : sc.getEnabledCounters()){
- LOG.debug(cet.name() + ": " + sc.getCountersMap().get(cet).getStat());
+ LOG.debug("{}: {}", cet.name(), sc.getCountersMap().get(cet).getStat());
}
}
}