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

Intercept calls to e.printStackTrace() to log to sfl4j #131

Open
wsargent opened this issue Nov 1, 2021 · 0 comments
Open

Intercept calls to e.printStackTrace() to log to sfl4j #131

wsargent opened this issue Nov 1, 2021 · 0 comments

Comments

@wsargent
Copy link
Contributor

wsargent commented Nov 1, 2021

In the situation where there's an e.printStackTrace() we should be able to use bytebuddy to rewrite this to something more like:

Logger logger = LoggerFactory.getLogger(this.getClass());
logger.error(e.getMessage(), e);

This should be able to apply even when you didn't write the code in question.

https://stackoverflow.com/questions/67404010/how-can-i-make-a-log-for-exceptions-using-jdbc/67404400#67404400

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