https://prefect.io logo
k

Khuyen Tran

11/15/2022, 4:59 PM
Prefect now supports colored log levels in the 2.6.7 version. 🌈 Test code:
Copy code
import asyncio
from prefect import flow, get_run_logger

@flow
async def test_async_flow():
    await asyncio.sleep(3)
    logger = get_run_logger()
    logger.debug("a debug")
    <http://logger.info|logger.info>("my info")
    logger.warning("some warning")
    logger.critical("super critical")
    logger.error("error!")
    print('all done')

@flow
def test_sync_flow():
    test_async_flow()

test_sync_flow()
View more here. Kudos to @Andrew Huang for this cool feature.
its beautiful 7
🌈 15
terminal 6
2 Views