use of com.google.gerrit.audit.SshAuditEvent in project gerrit by GerritCodeReview.
the class SshLog method audit.
private void audit(Context ctx, Object result, String cmd, ListMultimap<String, ?> params) {
String sessionId;
CurrentUser currentUser;
long created;
if (ctx == null) {
sessionId = null;
currentUser = null;
created = TimeUtil.nowMs();
} else {
SshSession session = ctx.getSession();
sessionId = IdGenerator.format(session.getSessionId());
currentUser = session.getUser();
created = ctx.created;
}
auditService.dispatch(new SshAuditEvent(sessionId, currentUser, cmd, created, params, result));
}
Aggregations