Use logger.exception() and exc_info=True to retain stack traces for debugging, addressing Codex review feedback on PR #110.