Consider removing the Double logging feature maintained in 7.x
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
### Expected Behavior
Two near-identical full-stack-trace knobs that can double-log. You now have:
- grails.exceptionresolver.logFullStackTrace → logFullStackTraceIfEnabled() emits to STACK_LOG before filtering (resolver, line 280).
- grails.exceptionresolver.logFullStackTraceOnFilter → DefaultStackTraceFilterer.filter() emits to the same STACK_LOG with the same FULL_STACK_TRACE_MESSAGE
(filterer, line 131).
If a user sets logFullStackTrace: true and leaves logFullStackTraceOnFilter at its true default, the unfiltered trace is logged to StackTrace twice. The names are nearly indistinguishable and the behaviors overlap. I'd reconcile to one concept: make the resolver-level logFullStackTrace the single switch, and have logFullStackTraceOnFilter either delegate to it or be documented as deprecated/legacy. At minimum, guard against both firing. This is the thing most likely to bite a user (and confuse a reviewer on the PR).
@jdaugherty you wanted to keep this in 7.x, can we clean this up in 8.x?
### Version
7.x
Contributor guide
Research direction
Start by comparing logFullStackTraceIfEnabled() in the resolver with DefaultStackTraceFilterer.filter(), especially resolver line 280 and filterer line 131, and trace how both use STACK_LOG and FULL_STACK_TRACE_MESSAGE. Decide how the resolver-level switch should relate to logFullStackTraceOnFilter in 8.x. Done means the overlapping configuration is reconciled and enabling full-stack logging cannot emit the same trace twice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend, observability
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100