Created
December 14, 2022 12:31
-
-
Save anna-geller/db890d3907b60c272866a55a2e30d4b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect import flow, task | |
from loguru import logger | |
from prefect_utils.loguru import enable_loguru_support | |
def mycustom_function(): | |
logger.info("I'm a custom function") | |
@task | |
def mytask(): | |
enable_loguru_support() | |
logger.info("This task log shows up in the Prefect UI") | |
@flow | |
def myflow(): | |
enable_loguru_support() | |
logger.info("This flow log shows up in the Prefect UI") | |
mytask() | |
mycustom_function() | |
mytask.submit() | |
if __name__ == "__main__": | |
myflow() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment