feat(conversation-memory): add file-based logging system - #420
Conversation
- Add logger.ts with logInfo, logError, logWarn, logDebug functions - Log files stored in ~/.config/conversation-memory/logs/YYYY-MM-DD.log - logError() writes to file only (no stderr) to prevent LLM context contamination - Track API calls, token usage, summarization progress, and errors - Add filename parameter to summarizeConversation() for better log context Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds structured file-based logging infrastructure to the conversation-memory plugin. Introduces a logger module with LogLevel enum and four logging functions (logInfo, logWarn, logError, logDebug). Updates indexer and summarizer to integrate logging, adds path utilities for log file management, and enhances summarizeConversation with a filename parameter for improved traceability. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
~/.config/conversation-memory/logs/YYYY-MM-DD.logChanges
Key Design Decision
logError()writes to file only (no stderr) to prevent error details from leaking into LLM context when run as a CLI tool. This addresses the concern that stderr output can be captured and included in the LLM's prompt.Log Format
Test Plan
conversation-memory syncto verify logging works~/.config/conversation-memory/logs/🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements