How can I completely block these Prefect logs? I ...
# ask-community
d
How can I completely block these Prefect logs? I did not opt in to this. Seems to be a behavior change from 2.x to 3.x
Copy code
Finished in state Completed(message=None, type=COMPLETED, result=ResultRecord(metadata=ResultRecordMetadata(...
Every time one of my tasks finishes, its outputs are involuntarily printed to the cloud logs. This is unacceptable as some task outputs contain secrets such as auth tokens, and now we have to deal with leaked secrets.
@Marvin
n
hi @David Michael Carter - can you share what your task looks like? its odd to me that all that is included are you returning the state object from the task?
hmm actually i don't think that makes a difference. do you have any settings to customize how state objects are rendered? https://docs.prefect.io/v3/api-ref/settings-ref#loggingsettings
d
seems to always print for the final flow return value (often
None
). And every task in between when i have chained together mapped tasks. But I have also seen it for a normal synchronous task which is fed into the chained/mapped task tree
almost all of my flows use task mapping.
n
yea seems like we should not be sending the full repr of the state object to the API, will look into that feel free to open an issue for tracking
d
we tracked it down to the deployment cicd pipeline where someone forced debug mode = True on all deployments. Thanks though
n
👍