Hello thanks for the hard work prefect 2.0 seems r...
# prefect-community
l
Hello thanks for the hard work prefect 2.0 seems really promising 👏 I did manage to work a very simple hello world in a kubernetes job and have just a question, is that still possible to have the ouptut of a python function in the job run log ? From what i have seen i can’t see the ouptput (picture in thread)
r
Hey Lucien!! When you say output, are you talking about logging the return value of a python function? In general, having a task do the work of your flow is good practice and will return more information about the work done in a task run. https://orion-docs.prefect.io/concepts/flows/#composing-flows
l
oh great to know i didn’t use a task as my exemple was verrrryyyyy basic
r
@Lucien Fregosi Khuyen gave a great quick demo of this https://prefect-community.slack.com/archives/CL09KTZPX/p1656691165747079
👍 3
l
hi @Rob Freedy I did use a task and watched the video but still doesn’t have any
print()
or
<http://logger.info|logger.info>()
displayed in the Prefect Flow run ui (but the
print
is displayed in the worker pod output)
r
Hey Lucien! Are you seeing the flow runs in your Prefect Cloud account? If so, have you logged in to your prefect cloud account using the following command?
$ prefect cloud login --key xxx_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
https://orion-docs.prefect.io/ui/cloud-getting-started/#configure-execution-environment
l
Hi @Rob Freedy i used prefect server deployed in a K8s cluster I see my flow run and I see the output of the job but nor
print
neither
<http://logging.info|logging.info>()
Ok just discovered
get_run_logger()
It works well with this function