terse-logback icon indicating copy to clipboard operation
terse-logback copied to clipboard

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

Open wsargent opened this issue 2 years ago • 0 comments

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

wsargent avatar Nov 01 '21 00:11 wsargent