Skip to content

Conversation

@Moshiii
Copy link

@Moshiii Moshiii commented Nov 29, 2025

Description

This is a simple improvement of client side logging format.

Screenshot 2025-11-29 at 6 47 29 PM

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Moshiii, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on refining the client-side logging experience and updating the project's dependency landscape. The logging improvements aim to reduce noise and present output in a more digestible format, particularly for JSON data. Concurrently, the dependency lock file has been comprehensively updated to incorporate newer library versions and integrate new development tools, contributing to a more stable and modern development environment.

Highlights

  • Improved Client-Side Logging: Verbose logging from a2a.client.client and httpx modules is now suppressed, and JSON responses are pretty-printed with indent=2 for enhanced readability.
  • Dependency Updates and Refinements: The uv.lock file has been updated to include newer versions of a2a-sdk and ag2, remove the asyncer dependency, and introduce new packages like librt, mypy, and pathspec.
  • Project Structure Adjustment: The uv.lock file now reflects a change in project membership, renaming a2a-samples-mcp to ag2-a2a and adjusting its package definition.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Moshiii
Copy link
Author

Moshiii commented Nov 29, 2025

@zeroasterisk @DracoBlue @ehsavoie @whitlockjc Please review. Thanks!

@Moshiii Moshiii closed this Nov 29, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the client-side logging in the helloworld sample by suppressing verbose logs from third-party libraries and enhancing the readability of JSON output. The dependency lock file is also updated to reflect new and updated packages. My review provides a few suggestions to further improve logging consistency and formatting in test_client.py.

@@ -22,6 +22,11 @@ async def main() -> None:
# Configure logging to show INFO level messages
logging.basicConfig(level=logging.INFO)
Copy link
Contributor

Choose a reason for hiding this comment

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

low

To make the logging even better and more informative, consider adding a format to your basicConfig. This will give you more control over the log output, including timestamps, which can be very helpful for debugging.

Suggested change
logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')


response = await client.send_message(request)
print(response.model_dump(mode='json', exclude_none=True))
print(response.model_dump_json(indent=2, exclude_none=True))
Copy link
Contributor

Choose a reason for hiding this comment

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

low

For consistency with the rest of the logging in this file, consider using logger.info instead of print to output the response. This will ensure all output is uniformly formatted and goes through the configured logging system.

Suggested change
print(response.model_dump_json(indent=2, exclude_none=True))
logger.info(response.model_dump_json(indent=2, exclude_none=True))


async for chunk in stream_response:
print(chunk.model_dump(mode='json', exclude_none=True))
print(chunk.model_dump_json(indent=2, exclude_none=True))
Copy link
Contributor

Choose a reason for hiding this comment

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

low

For consistency with the rest of the logging in this file, consider using logger.info instead of print to output the response chunks. This will ensure all output is uniformly formatted and goes through the configured logging system.

Suggested change
print(chunk.model_dump_json(indent=2, exclude_none=True))
logger.info(chunk.model_dump_json(indent=2, exclude_none=True))

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