feat: Add comprehensive LLM exchange logging#144
feat: Add comprehensive LLM exchange logging#144gary-van-woerkens wants to merge 1 commit intomainfrom
Conversation
- Add LLMLogEntry interface for structured logging - Implement configurable log levels: disabled, metadata, truncated, full - Add logLLMRequestSent, logLLMResponseReceived, logLLMRequestFailed functions - Integrate logging in line-comments-sender with automatic timing and token tracking - Add LOG_LLM_EXCHANGES environment variable for configuration - Include comprehensive tests for all logging levels and scenarios - Update README with complete logging documentation and security considerations - Add .env.example configuration for the new logging feature This enables full visibility into LLM exchanges while maintaining security and performance controls.
|
2cd6e78 to
ecbeb74
Compare
|
🎉 Deployment for commit 5b1d04d : IngressesDocker images
|
d69789a to
05a51e8
Compare
Review completed. Found 2 issues that need attention:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
|
||
| try { | ||
| // Log request being sent | ||
| logLLMRequestSent(prompt, model, strategyName) |
There was a problem hiding this comment.
The LLM logging functions are called without PR context (pr_number, repository), even though this information is available in the call chain. The sendToAnthropic function receives a PlatformContext containing prNumber, repoOwner, and repoName, but this context isn't passed to lineCommentsSender. This makes it difficult to correlate LLM logs with specific PRs in production environments where multiple PRs may be processed concurrently.
Fix it with Roo Code or mention @roomote and request a fix.
| REPOSITORY_FOLDER: "/app/repos" | ||
| LOG_LLM_EXCHANGES: "full" | ||
|
|
||
| #LOG_LLM_EXCHANGES=metadata # production mode | ||
| #LOG_LLM_EXCHANGES=truncated # quick review | ||
| #LOG_LLM_EXCHANGES=full # full LLM data | ||
| #LOG_LLM_EXCHANGES=disabled # no LLM logs |
There was a problem hiding this comment.
These comment lines use # which is invalid YAML syntax within the data section of a ConfigMap. YAML comments must be outside of string values or the ConfigMap will fail to parse during deployment. Either remove these lines or move them outside the data section as proper YAML comments.
| REPOSITORY_FOLDER: "/app/repos" | |
| LOG_LLM_EXCHANGES: "full" | |
| #LOG_LLM_EXCHANGES=metadata # production mode | |
| #LOG_LLM_EXCHANGES=truncated # quick review | |
| #LOG_LLM_EXCHANGES=full # full LLM data | |
| #LOG_LLM_EXCHANGES=disabled # no LLM logs | |
| # Configuration options for LOG_LLM_EXCHANGES: | |
| # - metadata: production mode (logs only metadata) | |
| # - truncated: quick review (logs metadata + truncated content) | |
| # - full: full LLM data (logs complete prompts and responses) | |
| # - disabled: no LLM logs | |
| data: | |
| REPOSITORY_FOLDER: "/app/repos" | |
| LOG_LLM_EXCHANGES: "full" |
Fix it with Roo Code or mention @roomote and request a fix.



This enables full visibility into LLM exchanges while maintaining security and performance controls.