private void auditLog(HttpServletRequest servletRequest) {
    if(!auditLogger.isEnabled()) {
      return;
    }
    LogoutAuditEvent logoutEvent = LogoutAuditEvent.builder()
      .withTimestamp(System.currentTimeMillis())
      .withRemoteIp(RequestUtils.getRemoteAddress(servletRequest))
      .withUserName(AuthorizationHelper.getAuthenticatedName())
      .withProxyUserName(AuthorizationHelper.getProxyUserName())
      .build();
    auditLogger.log(logoutEvent);
  }
Creates and send and audit log event that the user has successfully logged out
@param servletRequest
ambari-server/src/main/java/org/apache/ambari/server/api/services/LogoutService.java