The GitHub Actions job "CI" on 
grails-core.git/7.1.x-grailsutil-honor-filterer-config has failed.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
a39b3a5033a1b737cce6e76b8d93720716e2ebdf / Scott Murphy Heiberg 
<[email protected]>
GrailsUtil: honor stackTraceFiltererClass and logFullStackTraceOnFilter

GrailsUtil held a hardcoded `private static final DefaultStackTraceFilterer`
that ignored grails.logging.stackTraceFiltererClass and the new
grails.exceptionresolver.logFullStackTraceOnFilter flag. Non-resolver callers
of the filterer — most visibly GroovyPageView.handleException via
GrailsUtil.deepSanitize on GSP view-render exceptions, plus scheduled jobs
and custom code calling sanitizeRootCause/deepSanitize directly — produced
StackTrace logger emissions that no config key could suppress. The only
workaround was silencing the StackTrace logger in logback, which is too
blunt and is called out in the user guide as a fallback rather than the
intended control surface.

Resolve the filterer lazily from Holders.findApplication().getConfig() on
first use. Cache the resolved instance once an application is discoverable;
pre-context callers (early init, plain main, tests) get a fresh uncached
default so a later call after the context boots can still populate the
cache. Propagate the on-filter flag to DefaultStackTraceFilterer instances
the same way GrailsExceptionResolver.applyLogFullStackTraceOnFilter does,
leaving custom StackTraceFilterer implementations responsible for their own
logging policy.

Default behavior is unchanged — unset config yields a DefaultStackTraceFilterer
with logFullStackTraceOnFilter=true, matching the previous static field. All
exception paths and instantiation failures fall back to the default with a
logged warning so a bad config value can't break GrailsUtil callers.

Adds GrailsUtilStackFiltererSpec covering the three branches (no app, custom
class, on-filter propagation). Existing GrailsUtilTests and
StackTraceFiltererSpec unchanged and passing.

Documents the change in the Logging Full Stack Traces guide and the 7.1.x
upgrade notes.

Report URL: https://github.com/apache/grails-core/actions/runs/25975063839

With regards,
GitHub Actions via GitBox

Reply via email to