jdaugherty commented on code in PR #15564:
URL: https://github.com/apache/grails-core/pull/15564#discussion_r3052634587


##########
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:
   Isn't this a different meaning now?  Before it would have been the full 
stack trace while now it's the filtered.  Wouldn't a better solution be to set 
the logging to trace or something for these detailed stack traces ?  Instead of 
this change why not disable STACK_LOG if you don't want this output?  



-- 
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]

Reply via email to