PrefectHQ / ControlFlow

🦾 Take control of your AI agents
https://controlflow.ai
Apache License 2.0
593 stars 40 forks source link

Native Prefect Logging in ControlFlow flow #220

Open robfreedy opened 2 months ago

robfreedy commented 2 months ago

Enhancement Description

Currently, if you define a Prefect logger inside of a ControlFlow flow, the logs will not appear in the Prefect flow run logs natively.

This issue tracks adding either the Prefect logger natively or some sort of wrapper to allow for the Prefect logger logs to appear in flow run logs when run inside of a ControlFlow flow.

Use Case

from controlflow import flow
from prefect import get_run_logger

@flow
def example_controlflow():
    logger = get_run_logger()
    logger.info("Starting Baseball Control Flow")

example_controlflow()

Proposed Implementation

No response