Is there anyway to add the output of a command to ...
# ask-community
m
Is there anyway to add the output of a command to the prefect logs
c
You could follow a pattern similar to this: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/tasks/shell.py#L97-L103 Also note that you can initialize tasks with
log_stdout=True
which will attempt to convert all stdout within your task into a prefect log, e.g.
Copy code
@task(log_stdout=True)
def my_task():
    ...
upvote 1