Search in sources :

Example 1 with LogEvent

use of com.serotonin.m2m2.rt.console.LogEvent in project ma-core-public by infiniteautomation.

the class LoggingDaoMetrics method getLogs.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.logging.LoggingDao#getLogs(long, long, int)
	 */
@Override
public List<LogEvent> getLogs(long from, long to, int level, int limit) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    List<LogEvent> values = dao.getLogs(from, to, level, limit);
    LogStopWatch.stop("getLogs(from, to, level) (" + from + ", " + to + ", " + level + "){" + values.size() + "}", this.metricsThreshold);
    return values;
}
Also used : LogEvent(com.serotonin.m2m2.rt.console.LogEvent) LogStopWatch(com.serotonin.log.LogStopWatch)

Example 2 with LogEvent

use of com.serotonin.m2m2.rt.console.LogEvent in project ma-core-public by infiniteautomation.

the class LoggingDaoMetrics method getLogs.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.logging.LoggingDao#getLogs(long, long, int)
	 */
@Override
public List<LogEvent> getLogs(long from, long to, List<Integer> levels, int limit) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    String sqlIn = "[";
    for (int i = 0; i < levels.size(); i++) {
        sqlIn += levels.get(i);
        if (i < levels.size())
            sqlIn += ",";
    }
    sqlIn += "]";
    List<LogEvent> values = dao.getLogs(from, to, levels, limit);
    LogStopWatch.stop("getLogs(from, to, levels) (" + from + ", " + to + ", " + sqlIn + "){" + values.size() + "}", this.metricsThreshold);
    return values;
}
Also used : LogEvent(com.serotonin.m2m2.rt.console.LogEvent) LogStopWatch(com.serotonin.log.LogStopWatch)

Aggregations

LogStopWatch (com.serotonin.log.LogStopWatch)2 LogEvent (com.serotonin.m2m2.rt.console.LogEvent)2