Skip to content

add logging to agentchat#3606

Merged
ekzhu merged 3 commits into
stagingfrom
agentchat_logging_vd
Oct 4, 2024
Merged

add logging to agentchat#3606
ekzhu merged 3 commits into
stagingfrom
agentchat_logging_vd

Conversation

@victordibia

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Add logging for Agentchat.

  • Make RoundRobinTeam emit logs (using the python logging library) on agent publish events,
  • Add a default log handler that prints to console.

Future updates may consider libraries like rich for more detailed rendering of logs.

Related issue number

Checks

@victordibia victordibia requested a review from ekzhu October 3, 2024 00:32
Comment thread python/packages/autogen-agentchat/src/autogen_agentchat/teams/_utils.py Outdated
Comment thread python/packages/autogen-agentchat/src/autogen_agentchat/teams/_utils.py Outdated
Comment thread python/packages/autogen-agentchat/src/autogen_agentchat/teams/_base_team.py Outdated
@victordibia victordibia marked this pull request as ready for review October 3, 2024 17:10
@victordibia victordibia requested a review from ekzhu October 3, 2024 17:10
@ekzhu ekzhu merged commit fdb8f8a into staging Oct 4, 2024
@ekzhu ekzhu deleted the agentchat_logging_vd branch October 4, 2024 00:30
@anusonawane

Copy link
Copy Markdown

Hi, Can you please help me here, I want to make the logs seem more structured
I am using the following code.

`logging_session_id = autogen.runtime_logging.start(logger_type="file", config={"filename": "runtime.log"})
logger.info("Logging session ID: " ,str(logging_session_id))

#Agent chat

autogen.runtime_logging.stop()`

@ekzhu

ekzhu commented Oct 21, 2024

Copy link
Copy Markdown
Contributor

Hi, Can you please help me here, I want to make the logs seem more structured

I am using the following code.

`logging_session_id = autogen.runtime_logging.start(logger_type="file", config={"filename": "runtime.log"})

logger.info("Logging session ID: " ,str(logging_session_id))

#Agent chat

autogen.runtime_logging.stop()`

Can you post this question in GitHub discussions?

@anusonawane

Copy link
Copy Markdown

#3857 (comment)

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.

3 participants