@Override public void addRequestLogEntry(RequestProcessingInfo info, CrudUI ui) { if (settings.isRequestLogEnabled()) { if (info.getTimeSinceRequestStart() >= settings.getRequestLogMinimalDurationMillis()) { try { String url = ui.getPage().getLocation().toString(); String svnUrl = ui.getPortletConfig() != null ? ui.getPortletConfig().getFileName() : null; dao.storeRequestLogEntry( url, // svnUrl, // info.getSqlStatements(), // info.getCountOfSqlStatements(), // info.getStartDate(), // info.getTimeSinceRequestStart(), // info.getMeasuredTime("db")); } catch (Exception e) { LOGGER.error("Error writing request log entry", e); } } } }
/** * Removes all entries older than the preconfigured age from C2G_REQUEST_LOG. * * <p>Method execution is scheduled by a cron expression from * eai-portal-administration.properties. */ protected void cleanupRequestLogTable() { int deletedRows = dao.cleanupRequestLogTable(newestDateToDelete()); LOGGER.info("Deleted {} rows during request log cleanup", deletedRows); }