Thread
#prefect-community
    Michelle Wu

    Michelle Wu

    1 year ago
    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?
    Jakub Hettler

    Jakub Hettler

    1 year ago
    Hi @Michelle Wu,On local machine you can just use print and you will see the output in stdout. On server you 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
    Michelle Wu

    Michelle Wu

    1 year ago
    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?
    Jakub Hettler

    Jakub Hettler

    1 year ago
    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?
    Michelle Wu

    Michelle Wu

    1 year ago
    @Jakub Hettler nevermind, thank you! btw this is for running some daily routine lol
    Jakub Hettler

    Jakub Hettler

    1 year ago
    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.