Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to suppress Exception Detailed Messages [For Security/Audit Reasons] #1058

Open
patrickjamesbarry opened this issue Feb 13, 2025 · 1 comment

Comments

@patrickjamesbarry
Copy link

Problem:
We are using ShortenedThrowableConverter and it can exclude lines in the stack trace, but we need to suppress the actual exception messages.

The Ask:
Because we work in cloud service and have to be VERY careful what appears in the logs, we sometime cannot log the full stacktrace with detailed message. We would like a way to indicate that certain log messages need to print the stack trace with java classnames and line numbers, but not print ANY detailed messages in the entire stack trace. This includes Caused By exceptions, etc. This suppression might be triggered with the use of a logback Marker. One could ask- if you get rid of the message, is it even still helpful? Yes, it is better than nothing. We would still be able to the java class/Exception type that was thrown and the location in the code it came from.

We have looked into extending and overriding ShortenedThrowableConverter to accomplish this, but the methods we need to get to are private. If there is another existing way to accomplish this, please let me know!

@patrickjamesbarry
Copy link
Author

PR: #1059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant