It's built in - the ~/.claude/projects folder stores the JSONL for 30 days or you can extend the retention time like this: https://simonwillison.net/2025/Oct/22/claude-code-logs/