Skip to content

reduce some logging for prod release#2440

Merged
sawka merged 2 commits intomainfrom
sawka/devlogs
Oct 16, 2025
Merged

reduce some logging for prod release#2440
sawka merged 2 commits intomainfrom
sawka/devlogs

Conversation

@sawka
Copy link
Member

@sawka sawka commented Oct 16, 2025

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a dev-only logger and switches several internal debug logs to use it. New function DevPrintf is added in pkg/util/logutil/logutil.go and is used in pkg/aiusechat/openai/openai-backend.go and pkg/aiusechat/usechat.go to replace some log.Printf calls. pkg/aiusechat/openai/openai-convertmessage.go’s debugPrintReq now returns early when not in dev mode. Some ad-hoc debug prints were removed and one metrics log message text was adjusted. .golangci.yml adds version: 2, expands disabled linters, and adds an exclude-rule for unused params. No existing exported signatures (other than the new DevPrintf) were changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ❓ Inconclusive The pull request has no description, leaving reviewers without context for the logging changes and their purpose, which makes it unclear why these modifications were introduced. Please provide a brief summary explaining the changes made and the rationale behind reducing logging for production to guide the review process.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately summarizes the primary change of reducing logging output in production by switching debug and verbose logs to dev-only mode, and it is concise and specific enough for teammates to understand the main intent.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd34240 and 221df4a.

📒 Files selected for processing (1)
  • .golangci.yml (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sawka sawka merged commit 4077c26 into main Oct 16, 2025
5 of 7 checks passed
@sawka sawka deleted the sawka/devlogs branch October 16, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant