Skip to content

feat: more logging for agents #9138

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

Merged
merged 1 commit into from
Jun 20, 2025

Conversation

etorreborre
Copy link
Member

@etorreborre etorreborre commented Jun 17, 2025

This PR:

  • Adds a few more logs for: Model, Tool
  • Enables the logging of ockam Rust components.
  • Allows the user to specify a string setting the logging configuration from inside the main code.

For example:

set_log_levels("agent=debug") 

Will set the logs of the agent actions to the debug level, whereas:

set_log_levels("debug,agent=info")

Will set the logs of all the python modules to debug but the ones from agent to info.

See some other variations in logging_test.py.

Notes

  • The loggers are loaded lazily when their corresponding class is accessed for the first time (not just loaded).
  • The convention I've used is:
    • At the INFO level: "do action", for example "start agent 'x'"
    • At the DEBUG level: "the action is done" or "the action is done with result: y"

@etorreborre etorreborre force-pushed the etorreborre/feat/more-logging-for-agents branch 8 times, most recently from f9a6473 to fb38e25 Compare June 17, 2025 18:01
@etorreborre etorreborre self-assigned this Jun 17, 2025
@etorreborre etorreborre marked this pull request as ready for review June 17, 2025 18:02
@etorreborre etorreborre requested a review from a team as a code owner June 17, 2025 18:02
davide-baldo
davide-baldo previously approved these changes Jun 18, 2025
Copy link
Member

@davide-baldo davide-baldo left a comment

Choose a reason for hiding this comment

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

A huge step up in logging!

@adrianbenavides adrianbenavides force-pushed the etorreborre/feat/more-logging-for-agents branch 5 times, most recently from 466561c to 583449c Compare June 20, 2025 18:31
@mrinalwadhwa mrinalwadhwa self-requested a review June 20, 2025 19:03
mrinalwadhwa
mrinalwadhwa previously approved these changes Jun 20, 2025
@adrianbenavides adrianbenavides added this pull request to the merge queue Jun 20, 2025
@adrianbenavides adrianbenavides removed this pull request from the merge queue due to a manual request Jun 20, 2025
@adrianbenavides adrianbenavides dismissed mrinalwadhwa’s stale review June 20, 2025 20:08

The merge-base changed after approval.

@adrianbenavides adrianbenavides force-pushed the etorreborre/feat/more-logging-for-agents branch from 583449c to f92db75 Compare June 20, 2025 20:08
@mrinalwadhwa mrinalwadhwa self-requested a review June 20, 2025 20:11
@adrianbenavides adrianbenavides added this pull request to the merge queue Jun 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 20, 2025
@adrianbenavides adrianbenavides added this pull request to the merge queue Jun 20, 2025
Merged via the queue into develop with commit f4af163 Jun 20, 2025
48 checks passed
@adrianbenavides adrianbenavides deleted the etorreborre/feat/more-logging-for-agents branch June 20, 2025 21:02
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