Skip to content

chore: fix logging error in mcp stdio#1322

Merged
Crunchyman-ralph merged 1 commit into
nextfrom
ralph/batch.mcp.fixes
Oct 18, 2025
Merged

chore: fix logging error in mcp stdio#1322
Crunchyman-ralph merged 1 commit into
nextfrom
ralph/batch.mcp.fixes

Conversation

@Crunchyman-ralph

@Crunchyman-ralph Crunchyman-ralph commented Oct 18, 2025

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • 🐛 Bug fix
  • ✨ Feature
  • 🔌 Integration
  • 📝 Docs
  • 🧹 Refactor
  • Other:

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

  • Created changeset: npm run changeset
  • Tests pass: npm test
  • Format check passes: npm run format-check (or npm run format to fix)
  • Addressed CodeRabbit comments (if any)
  • Linked related issues (if any)
  • Manually tested the changes

Changelog Entry


For Maintainers

  • PR title follows conventional commits
  • Target branch correct
  • Labels added
  • Milestone assigned (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Corrected logging output stream configuration to properly segregate tool execution logs from startup messages, improving log handling and system compatibility.

@changeset-bot

changeset-bot Bot commented Oct 18, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 95d4ba9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The logging output in the main log function has been redirected from console.log to console.error. All other logging behavior—prefix generation, colorization, level filtering, and silent mode handling—remains unchanged. This redirects tool execution logs to stderr while preserving stdout for startup logs.

Changes

Cohort / File(s) Summary
Logging output redirection
mcp-server/src/logger.js
Changed primary log output destination from console.log to console.error in the main logging function

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "chore: fix logging error in mcp stdio" is directly related to the changeset. The PR modifies the logging functionality in mcp-server/src/logger.js by redirecting log output from console.log to console.error, which aligns with the goal of properly routing tool execution logs to stderr. The title correctly identifies this as a logging fix in the mcp stdio context and uses appropriate conventional commit formatting. While the term "logging error" could be slightly more specific (e.g., clarifying the redirect to stderr), it remains clear enough for a reviewer to understand that this addresses a logging-related issue in the targeted system.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ralph/batch.mcp.fixes

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccb87a5 and 95d4ba9.

📒 Files selected for processing (1)
  • mcp-server/src/logger.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js

📄 CodeRabbit inference engine (.cursor/rules/tests.mdc)

**/*.js: Declare and initialize global variables at the top of modules to avoid hoisting issues.
Use proper function declarations to avoid hoisting issues and initialize variables before they are referenced.
Do not reference variables before their declaration in module scope.
Use dynamic imports (import()) to avoid initialization order issues in modules.

Files:

  • mcp-server/src/logger.js
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/utils.js : Use the central `log` function for all output, use appropriate log levels, and support silent mode for programmatic usage.
🧬 Code graph analysis (1)
mcp-server/src/logger.js (1)
scripts/modules/utils.js (1)
  • prefix (232-232)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test

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

@Crunchyman-ralph Crunchyman-ralph merged commit 518d7ea into next Oct 18, 2025
6 checks passed
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