Skip to content

Change logging format #7

@felixschndr

Description

@felixschndr

In opinion the logging format of multi-mcp is pretty difficult to read because of the formatting:

INFO     Processing request of type CallToolRequest                server.py:536
DEBUG    Dispatching request of type CallToolRequest               server.py:539
INFO     ✅ Calling tool 'google-calendar_list-events' on its   mcp_proxy.py:106
         associated server
DEBUG    Received message: <mcp.shared.session.RequestResponder    server.py:494
         object at 0x72ea93c501d0>
DEBUG    Received message: <mcp.shared.session.RequestResponder    server.py:494
         object at 0x72ea93e93e90>
DEBUG    Received message:                                         server.py:494
         root=InitializedNotification(method='notifications/initia
         lized', params=None, jsonrpc='2.0')
DEBUG    Received message:                                         server.py:494
         root=InitializedNotification(method='notifications/initia
         lized', params=None, jsonrpc='2.0')
DEBUG    Received message:                                         server.py:494
         root=InitializedNotification(method='notifications/initia
         lized', params=None, jsonrpc='2.0')
INFO     Processing request of type CallToolRequest                server.py:536
DEBUG    Dispatching request of type CallToolRequest               server.py:539
INFO     ✅ Calling tool 'google-calendar_list-events' on its   mcp_proxy.py:106
         associated server
INFO     Processing request of type CallToolRequest                server.py:536
DEBUG    Dispatching request of type CallToolRequest               server.py:539
INFO     ✅ Calling tool 'google-calendar_list-events' on its   mcp_proxy.py:106
         associated server
DEBUG    Handling POST message                                        sse.py:136
DEBUG    Parsed session ID: ec151aad-7522-4517-8489-2b9820c4a2e6      sse.py:147
DEBUG    Received JSON: {'method': 'tools/call', 'params': {'name':   sse.py:160
         'google-calendar_list-events', 'arguments': {'timeMax':
         '2025-10-09T23:59:59', 'calendarId':
         'xxx
         [email protected]', 'timeMin':
         '2025-10-09T00:00:00'}}, 'jsonrpc': '2.0', 'id': 1}
DEBUG    Validated client message:                                    sse.py:164
         root=JSONRPCRequest(method='tools/call', params={'name':
         'google-calendar_list-events', 'arguments': {'timeMax':
         '2025-10-09T23:59:59', 'calendarId':
         'xxx
         [email protected]', 'timeMin':
         '2025-10-09T00:00:00'}}, jsonrpc='2.0', id=1)
DEBUG    Sending message to writer:                                   sse.py:172
         root=JSONRPCRequest(method='tools/call', params={'name':
         'google-calendar_list-events', 'arguments': {'timeMax':
         '2025-10-09T23:59:59', 'calendarId':
         'xxx
         [email protected]', 'timeMin':
         '2025-10-09T00:00:00'}}, jsonrpc='2.0', id=1)
INFO:     172.20.0.1:41010 - "POST /messages/?session_id=ec151aad7522451784892b9820c4a2e6 HTTP/1.1" 202 Accepted
DEBUG    Handling POST message                                        sse.py:136
DEBUG    Parsed session ID: 7864b4af-f78d-4857-9aa8-af766f7e8797      sse.py:147

It does not stretch the message across the whole screen.

I think this is because of the rich logging formatter. Maybe this could be exchanged through something more normal. You might take a look at this logger which produces a much more readable format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions