Improve stack trace logger.