https://prefect.io logo
Title
c

Charles Leung

03/29/2023, 5:17 PM
Hi Team, I'm trying to figure out a way to get all flow logs stored locally OR on an s3 bucket, is there a way we can do that? Im on Prefect UI
1
z

Zanie

03/29/2023, 5:17 PM
You can configure logging using the
logging.yaml
file for full customization
c

Charles Leung

03/29/2023, 6:29 PM
Thanks Zanie. Sorry I ran into another problem. When changing the PREFECT_LOGGING_SETTINGS_PATH variable, I accidentally changed it to an inaccessible path, and now I cant do prefect config unset because its saying the logging path is invalid. Any tips on getting back to default?
z

Zanie

03/29/2023, 7:25 PM
😄 You can edit the ~/.prefect/profiles.yaml file
🙌 1
toml*
We should probably add a way to ignore bad settings in a profile so you can unset them
c

Charles Leung

03/29/2023, 10:46 PM
Thanks I figured it out! I was wondering if I could use get_run_logger() to get the logging instance, and use FileHandler to write all of the logs to a file? This includes local logs and ones generated from prefect flows. We want to essentially save all the flows logs we see from Prefect UI (Flow -> runs tab)