Kyle
08/19/2023, 7:04 PMfrom prefect import flow, task, get_run_logger
...
@task(tags=["feather"])
def feather_get_stuff():
get_run_logger().info(f"test msg")
return []
Jake Kaplan
08/19/2023, 8:52 PMget_run_logger
? Can you run flows fine w/o it?Kyle
08/19/2023, 8:55 PM15:09:36.386 | INFO | Flow run 'sincere-coot' - Created subflow run 'tunneling-platypus' for flow 'map-fmp-cot-report'
15:09:36.388 | INFO | Flow run 'tunneling-platypus' - View at <http://127.0.0.1:4200/flow-runs/flow-run/cc147a85-dd61-468e-ba3c-0618b6d82633>
15:09:36.476 | INFO | Flow run 'tunneling-platypus' - Created task run 'feather_get_tickers_cot-0' for task 'feather_get_tickers_cot'
15:09:36.478 | INFO | Flow run 'tunneling-platypus' - Executing 'feather_get_tickers_cot-0' immediately...
15:09:36.557 | ERROR | Task run 'feather_get_tickers_cot-0' - Encountered exception during execution:
get_run_logger().info(f"GET feather file: {filepath}")
NameError: name 'get_run_logger' is not defined
Jake Kaplan
08/19/2023, 8:58 PMfrom prefect import get_run_logger
get_run_logger()
what about:
from prefect.logging import get_run_logger
get_run_logger()
Jake Kaplan
08/19/2023, 8:59 PMKyle
08/19/2023, 8:59 PMKyle
08/19/2023, 9:10 PMKyle
08/19/2023, 9:17 PM