ring icon indicating copy to clipboard operation
ring copied to clipboard

[stacktrace.clj] Allow condensed stack trace format

Open sirmspencer opened this issue 5 years ago • 2 comments

https://clojure.atlassian.net/browse/CLJ-2463

The linked patch to clojure condenses the stack trace to the important line(s). It would be great to see something similar for ring.

Important lines would be the cause and the lines for files in the current app (handler.clj:116 my-app.handler/a-function)

To me this is the most important for the sterr logging. When the error is displayed in the browser, it seems fine to show the whole trace. In the browser it looks like there is some attempt to style less important line with a lighter font. This could be a little easier to read if the same important line(s) were highlighted.

sirmspencer avatar Jan 28 '20 00:01 sirmspencer

I see that errors are also returned with a :trimmed-elems that is the shorter trace. This is a good key to use instead of trying to filter elems based on file or something else.

sirmspencer avatar Jan 28 '20 03:01 sirmspencer

I have a solution working on my local project, Ill create a PR soon.

sirmspencer avatar Jan 28 '20 04:01 sirmspencer