Skip to content

fix: remove global logger MCP-103 #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: ni/logger-changes
Choose a base branch
from

Conversation

nirinchev
Copy link
Collaborator

Proposed changes

This refactoring removes the global logger and instead creates a session-scoped logger for each session, which is then used by the whole server machinery. Additionally, we add a session id attribute once the session is bound to ensure that is included in the log messages.

The way this works is we create a composite logger that includes all configured loggers for the transport manager. Then as we create sessions, for each session we create a new composite logger that includes the transport logger and the MCP logger (if configured). Then all tools and api clients will use the session logger.

Checklist

@nirinchev nirinchev requested a review from a team as a code owner August 5, 2025 15:44
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