codeconsole commented on code in PR #15564:
URL: https://github.com/apache/grails-core/pull/15564#discussion_r3053840740
##########
grails-bootstrap/src/main/groovy/org/grails/exceptions/reporting/DefaultStackTraceFilterer.java:
##########
@@ -90,27 +90,38 @@ public Throwable filter(Throwable source, boolean
recursive) {
public Throwable filter(Throwable source) {
if (shouldFilter) {
- StackTraceElement[] trace = source.getStackTrace();
- List<StackTraceElement> newTrace = filterTraceWithCutOff(trace,
cutOffPackage);
-
- if (newTrace.isEmpty()) {
- // filter with no cut-off so at least there is some trace
- newTrace = filterTraceWithCutOff(trace, null);
- }
-
- // Only trim the trace if there was some application trace on the
stack
- // if not we will just skip sanitizing and leave it as is
- if (!newTrace.isEmpty()) {
- // We don't want to lose anything, so log it
+ boolean modified = doFilter(source);
+ if (modified) {
+ // Log the full stack trace once for the top-level exception
(includes causes)
STACK_LOG.error(FULL_STACK_TRACE_MESSAGE, source);
Review Comment:
@jdaugherty sensible defaults. logging a stracktrace 4x that has no useful
information (especially with the groovy 4 clutter) quickly leads to a scenario
where you can run out of disk space fast.
I have yet to see an example where the 4x logging provides anything useful.
do you have one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]