Skip to content

Commit

Permalink
COH-31333 - Update the session connection log output to be similar to…
Browse files Browse the repository at this point in the history
… other clients (#197)
  • Loading branch information
dhirupandey authored Jan 20, 2025
1 parent 6324336 commit 7dcce96
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/coherence/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,17 @@ async def create(session_options: Optional[Options] = None) -> Session:
session: Session = Session(session_options)
await session._set_ready(False)
await session._handshake.handshake()
if session._protocol_version > 0:
COH_LOG.info(
f"Session(id={session.session_id}, connected to [{session._session_options.address}]"
f" proxy-version={session._proxy_version}, protocol-version={session._protocol_version}"
f" proxy-member-id={session._proxy_member_id})"
)
else:
COH_LOG.info(
f"Session(id={session.session_id}, connected to [{session._session_options.address}]"
f" protocol-version={session._protocol_version})"
)
return session

# noinspection PyTypeHints
Expand Down

0 comments on commit 7dcce96

Please sign in to comment.