Skip to content

Consider removing the Double logging feature maintained in 7.x #15712

@codeconsole

Description

@codeconsole

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions