Hi! I have several tasks running in my flow right ...
# ask-community
m
Hi! I have several tasks running in my flow right now, I wonder how I can see the outputs of the tasks? for example, if I write a print statement in a python file, will it show up in the log?
j
Hi @Michelle Wu, On local machine you can just use print and you will see the output in stdout. *On server y*ou can use https://docs.prefect.io/core/concepts/logging.html#logging-stdout if you want to use print statement or https://docs.prefect.io/core/concepts/logging.html#logging-stdout get prefect logger and use logger - this will write output to the log
m
Thank you!! the log_stdout setting works perfectly. I have another question, if my task contains a ShellTask, which runs a python file in a different directory, how can I see the outputs of this python program in prefect UI?
j
I haven't used ShellTask so far, so please ask in the main discussion. But I am wondering why to use ShellTask for running Python if you can run it directly?
m
@Jakub Hettler nevermind, thank you! btw this is for running some daily routine lol
j
I understand that this is for some routine(s), but I don't understand running ShellTask which executes python file and not running Python code directly via prefect flow with schedule 🙂 But there is probably a reason.