Lang lang = (Lang) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG);
Page page = (Page) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
statsRecord.setIp(reqCtx.getRequest().getRemoteAddr());
statsRecord.setReferer(reqCtx.getRequest().getHeader("Referer"));
statsRecord.setSessionId(session.getId());
UserDetails currentUser = (UserDetails) session.getAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER);
StringBuffer rolesBuffer = new StringBuffer();
boolean isFirstRole = true;
IApsAuthority[] auths = currentUser.getAuthorities();
for (int i=0; i<auths.length; i++) {
if (auths[i] instanceof Role) {
Role role = (Role) auths[i];
if (!isFirstRole) rolesBuffer.append(" - ");
rolesBuffer.append(role.getName());