Skip to content

Add logging#72

Merged
zmofei merged 1 commit intomainfrom
add-loggging
Mar 24, 2026
Merged

Add logging#72
zmofei merged 1 commit intomainfrom
add-loggging

Conversation

@zmofei
Copy link
Member

@zmofei zmofei commented Nov 21, 2025

Description

This pull request focuses on improving the initialization and logging process for tracing in the src/index.ts server startup sequence. The changes ensure that tracing initialization errors are captured and logged after the server connection is established, and add support for logging as a server capability.

Key improvements include:

Tracing initialization and error handling:

  • Errors during tracing initialization are now stored and logged only after the server has connected, ensuring logging messages are delivered reliably. [1] [2]
  • The tracing error is now consistently captured as an Error object for better message formatting. [1] [2]

Server capabilities and startup sequence:

  • Added a logging capability to the server's advertised capabilities, making it clear that logging is supported.
  • The order of server connection and message logging has been adjusted so that all logging (including tracing errors and status) occurs after the server is ready to send messages. [1] [2]
image
  • Closes #[issue-number] (if applicable)

Testing


Checklist

  • Code has been tested locally
  • Unit tests have been added or updated
  • Documentation has been updated if needed

Additional Notes

@zmofei zmofei requested a review from a team as a code owner November 21, 2025 11:25
@zmofei zmofei changed the title Add logging [WIP] Add logging Nov 21, 2025
Valiunia
Valiunia previously approved these changes Nov 24, 2025
@mattpodwysocki
Copy link
Contributor

@zmofei Why did we bump or were we bumping manifest versions since 7.0 had not been released yet?

@zmofei zmofei changed the title [WIP] Add logging Add logging Dec 9, 2025
@zmofei zmofei requested a review from Copilot December 9, 2025 09:33

This comment was marked as outdated.

- Declare logging capability in server options
- Move transport connection before log messages to ensure
  messages are sent after connection is established
- Store tracing initialization errors for deferred logging
- Make tracing status log branches mutually exclusive
Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@zmofei zmofei merged commit 0803ea3 into main Mar 24, 2026
9 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.

4 participants