add iologger for debugging purposes by juruen · Pull Request #15 · github/github-mcp-server · GitHub
Skip to content

add iologger for debugging purposes#15

Merged
juruen merged 1 commit intomainfrom
juruen/iologging
Mar 18, 2025
Merged

add iologger for debugging purposes#15
juruen merged 1 commit intomainfrom
juruen/iologging

Conversation

@juruen
Copy link
Copy Markdown
Collaborator

@juruen juruen commented Mar 17, 2025

Context

This PR introduces an IOLogger struct that logs all stdin and stdout interactions between the client and the server.

This feature is particularly useful for debugging, as it provides visibility into the exact input and output exchanged between the client and the server.

By default, logging is disabled but can be enabled by setting the enable-command-logging flag to true. I considered enabling it only when the log level is set to debug, but decided that having a separate toggle would be preferable due to potential privacy concerns.

Copilot AI review requested due to automatic review settings March 17, 2025 12:38
Copy link
Copy Markdown
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

A PR to add an IOLogger for logging stdin and stdout between the client and server for debugging purposes.

  • Introduces an IOLogger struct with Read and Write methods that log data.
  • Adds tests in pkg/log/io_test.go to verify logged IO behavior.
  • Updates the server startup in cmd/server/main.go to conditionally wrap standard IO with the IOLogger based on a new command flag.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
pkg/log/io.go Introduces the IOLogger implementation and its logging behavior on Read and Write.
pkg/log/io_test.go Provides tests to verify logged input and output functionality.
cmd/server/main.go Modifies server initialization to retrieve and pass a command logging flag and binds a new flag.
Files not reviewed (1)
  • go.mod: Language not supported

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Comment thread cmd/server/main.go Outdated
@juruen juruen force-pushed the juruen/iologging branch from 2386301 to 6d63777 Compare March 17, 2025 12:49
Copy link
Copy Markdown
Collaborator

@SamMorrowDrums SamMorrowDrums left a comment

Choose a reason for hiding this comment

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

I can see how this would save a lot of pain when iterating on things.

@juruen juruen merged commit e0bffe9 into main Mar 18, 2025
3 checks passed
@gelu22
Copy link
Copy Markdown

gelu22 commented Sep 12, 2025

DaleSeo pushed a commit to DaleSeo/github-mcp-server that referenced this pull request Oct 24, 2025
SamMorrowDrums added a commit that referenced this pull request Feb 18, 2026
Pin all three Dockerfile base images to their SHA256 digests to resolve
code scanning alerts for unpinned Docker images. Dependabot docker
ecosystem is already configured and will keep these digests up to date.

- node:20-alpine (alert #14)
- golang:1.25.7-alpine (alert #15)
- gcr.io/distroless/base-debian12 (proactive)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums added a commit that referenced this pull request Feb 18, 2026
Pin all three Dockerfile base images to their SHA256 digests to resolve
code scanning alerts for unpinned Docker images. Dependabot docker
ecosystem is already configured and will keep these digests up to date.

- node:20-alpine (alert #14)
- golang:1.25.7-alpine (alert #15)
- gcr.io/distroless/base-debian12 (proactive)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

4 participants