Skip to content

Conversation

@amrit110
Copy link
Owner

PR Type

Fix

Short Description

  • Fix logging in src/main.rs

@amrit110 amrit110 added the bug Something isn't working label Apr 16, 2025
@amrit110 amrit110 requested a review from Copilot April 16, 2025 16:02
@amrit110 amrit110 self-assigned this Apr 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • run.sh: Language not supported

@amrit110 amrit110 requested a review from Copilot April 16, 2025 16:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes logging in the code by replacing various print and log calls with eprintln wrapped around format_log_with_color, and deprecates the old log method in favor of the new approach.

  • Update logging in the main function in src/main.rs to use colorized output.
  • Replace app.log calls throughout src/app/core.rs and API modules in src/apis/* with eprintln and format_log_with_color.
  • Deprecate the old log method while adding direct logging for better visibility.

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main.rs Replaced console output with eprintln using format_log_with_color
src/app/core.rs Replaced internal log calls with eprintln and marked log() as deprecated
src/apis/openai.rs Added eprintln calls for request, response, and error logging
src/apis/ollama.rs Updated logging for request dispatch and error handling
src/apis/anthropic.rs Improved error logging with eprintln for response fetching and parsing
Files not reviewed (1)
  • run.sh: Language not supported

@amrit110 amrit110 merged commit b45bb9e into main Apr 16, 2025
7 checks passed
@amrit110 amrit110 deleted the fix_log_main branch April 16, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants