@Override
    public void record(final AuditActionContext ctx) {
        var matched = supportedActionsPerformed
            .stream()
            .anyMatch(action -> {
                var actionPerformed = ctx.getActionPerformed();
                return "*".equals(action) || Pattern.compile(action).matcher(actionPerformed).find();
            });

        if (matched) {
            matched = excludedActionsPerformed
                .stream()
                .noneMatch(action -> {
                    var actionPerformed = ctx.getActionPerformed();
                    return "*".equals(action) || Pattern.compile(action).matcher(actionPerformed).find();
                });
        }
        if (matched) {
            LOGGER.trace("Recording audit action context [{}]", ctx);
            auditTrailManagers.forEach(mgr -> mgr.record(ctx));

            if (applicationEventPublisher != null) {
                var auditEvent = new AuditApplicationEvent(ctx.getPrincipal(),
                    ctx.getActionPerformed(),
                    ctx.getApplicationCode(),
                    ctx.getClientInfo().getClientIpAddress(),
                    ctx.getClientInfo().getServerIpAddress(),
                    ctx.getResourceOperatedUpon(),
                    ctx.getWhenActionWasPerformed().toString(),
                    ctx.getClientInfo().getGeoLocation(),
                    ctx.getClientInfo().getUserAgent(),
                    ctx.getClientInfo().getLocale().getLanguage());
                applicationEventPublisher.publishEvent(auditEvent);
            }
        } else {
            LOGGER.trace("Skipping to record audit action context [{}] as it's not authorized as an audit action among [{}]",
                ctx, supportedActionsPerformed);
        }
    }
This is {@link FilterAndDelegateAuditTrailManager}.

@author Misagh Moayyed
@since 1.0
core/cas-server-core-audit-api/src/main/java/org/apereo/inspektr/audit/FilterAndDelegateAuditTrailManager.java