Skip to main content
Configure the default agno.utils.log logger with a custom Python logger by calling configure_agno_logging().
The source passes only custom_default_logger, which configures the default agno.utils.log logger. Agent, team, and workflow operations use separate loggers. Pass the custom logger to all four parameters to route those operation logs through it too.
custom_logging.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Configure every Agno logger

Replace configure_agno_logging(custom_default_logger=custom_logger) with configure_agno_logging(custom_default_logger=custom_logger, custom_agent_logger=custom_logger, custom_team_logger=custom_logger, custom_workflow_logger=custom_logger) in the saved file.
5

Run the example

Save the code above as custom_logging.py, then run:
Full source: cookbook/02_agents/14_advanced/custom_logging.py