Logging Agent Activity with Existing Logger #1577
stefanadelbert
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When running ADK CLI there is rich logging to stdout using the standard
logging
module. I'm planning on running an ADL agent in memory wrapped in a task in an orchestration tool (Dagster).The orchestration task has its own logger with specially configured handlers. I would like to be able to capture log messages from ADK using the same logging configuration as the orchestration task. I see that the Runner uses
logger = logging.getLogger('google_adk.' + __name__)
and a similar pattern is used throughout the codebase.I'm aware of the idea of using the callbacks to track agent activity. I could write something similar to the
OpikTracer
which takes a logger (the one from the orchestration task) and then writes log messages to it. The more I think about it, the more I like this option.Any other ideas on how to capture ADK agent activity using an existing logger?
Beta Was this translation helpful? Give feedback.
All reactions