How to turn log level to DEBUG in Prefect?

Before starting an agent, you can switch the log level to debug:

prefect config set PREFECT_LOGGING_LEVEL=DEBUG 
prefect agent start -q yourqueue

or you can set it on any infrastructure block:

from prefect.infrastructure import Process 
process_block = Process(env={"PREFECT_LOGGING_LEVEL": "DEBUG"}) 
process_block.save("prod", overwrite=True)
1 Like