Thanks Ray. The following log4j2.xml RegexFilter configuration worked for me to eliminated all log entries with the specified string:
---BEGIN---
<Loggers>
...
<AsyncLogger name="org.apereo.inspektr.audit.support" level="info" includeLocation="true" additivity="false">
<RegexFilter regex=".*SERVICE_ACCESS_ENFORCEMENT_TRIGGERED.*" onMatch="DENY" onMismatch="ACCEPT"/>
<AppenderRef ref="casAudit"/>
</AsyncLogger>
...
</Loggers>
---END---
Oddly enough, I could not get the same RegexFilter to work with my Appender (as you had suggested). The following RegexFilter string appears to be ignored:
---BEGIN---
<Appenders>
...
<RollingFile name="auditlogfile" fileName="${baseDir}/cas_audit.log" append="true"
filePattern="${baseDir}/cas_audit-%d{yyyy-MM-dd}-%i.log">
<RegexFilter regex=".*SERVICE_ACCESS_ENFORCEMENT_TRIGGERED.*" onMatch="DENY" onMismatch="ACCEPT"/>
<PatternLayout pattern="%d %p [%c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy />
<SizeBasedTriggeringPolicy size="300 MB"/>
<TimeBasedTriggeringPolicy />
</Policies>
</RollingFile>
<CasAppender name="casAudit">
<AppenderRef ref="auditlogfile" />
</CasAppender>
...
</Appenders>
---END---
If I can figure out how to apply the filter to the Appender rather than the Logger, I could write to two separate CAS audit log appenders, one that is filtered ("casAudit") and one that is unfiltered ("casAuditVerbose").
In retrospect, I think we will be fine with simply having a single CAS audit log, removing all "SERVICE_ACCESS_ENFORCEMENT_TRIGGERED" entries from it. But I am mystified why the RegexFilter fails to perform any action when configured with the Appender.
Carl