Record stack traces with logger