Reduce log pollution with unnecessary stack traces
See original GitHub issueMotivation
It’s hard to find relevant information in the log output if it’s polluted with stack traces of non-fatal errors or errors that are gracefully handled and mask the actual issue.
Proposal
Investigate options to reduce non-relevant information in the log, including
--verbose
flag enabling stack traces (and disabling them by default)- reduce logging level of detail (log only exception msg instead of full exception including stack trace)
- …?
Consideration that may help with the decision-making for these options:
- fatality of potential error
- which kind of information is useful to debug it (e.g. entity dump instead of stack trace)
- can the underlying error be “handed through” / be enriched with more information
- …?
Additional notes
There’s no general “this is the right way to do this”. But we should investigate, brainstorm and discuss how we want to handle it. Also, once we got to an agreement, we might want to document this in the contributor guides.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Testing for Stack Traces - WSTG - v4.1 | OWASP Foundation
Stack traces are not vulnerabilities by themselves, but they often reveal information that is interesting to an attacker. Attackers attempt to generate ...
Read more >How do I stop stacktraces truncating in logs - Stack Overflow
Show activity on this post. I found this useful to get the whole picture. Get a full stack trace of the Exception and...
Read more >Stack Trace In Error Message | Pentest Vulnerability Wiki
Pentesting for a common vulnerability such as stack trace in the error message can be easy with the Vulnerability Wiki, organized by OWASP...
Read more >Filtering irrelevant stack trace lines in logs - Tomasz Nurkiewicz
Tools and IDEs are doing a good job of reducing the noise. Eclipse has stack trace filter patterns for Junit, IntelliJ IDEA supports...
Read more >Logging Stack Traces - cf-nodejs-logging-support - SAP
If a stack trace exceeds a total size of 55kB, it will not be logged entirely. The library removes as few lines as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think for this discussion we’ll want to grab a few log files as case studies to center the conversation, and take notes on them as we go.
I am imagining this with a bunch of printouts and markers or crayons on a table, but I guess we will have to figure out some remote-friendly way to do it. 😆
Investing more in the logger’s configuration may also involve a side discussion: Do we want to stick with slf4j? I think that part of the java ecosystem has shifted since we adopted it.