a

    Adam Roderick

    2 years ago
    I have several tasks where I call out to the shell using subprocess. When I
    flow.run()
    locally, I see all the stdout information from these subprocesses in the prefect log output. But I do not see the same information in prefect cloud. Is there a configuration setting or something I can update to ensure I see this output in the cloud logs?
    If I capture the output of subprocess.check_output() and log it using the prefect logger, I get the output I was looking for
    j

    josh

    2 years ago
    Yep that would be the way of getting that information to cloud. Cloud only takes in logs sent through the prefect logger and not anything which is generally printed to stdout
    Chris White

    Chris White

    2 years ago
    This makes me think the Docker container running your flows has an older version of Prefect, as we log all stdout lines from the subprocess now: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/tasks/shell.py#L103