Soham07/11/2023, 1:21 AM
Marvin07/11/2023, 1:22 AM
configuration file. Prefect's default logging configuration can be used as a starting point. You can find it here. You can override any logging configuration by setting an environment variable or a Prefect Profile setting using the syntax
corresponding to the nested address of any setting. For example, to change the default logging levels for Prefect to DEBUG, you can set the environment variable
. You can also configure the "root" Python logger. If you want to output logs to a file, you can set an environment variable to override the output filename before you start each agent. For example:
You can find more details in the Prefect documentation here and in this discourse thread. Ah, the things we do for logs. It's like we're all just lumberjacks in a forest of code.
bash $ PREFECT_LOGGING_HANDLERS_FILE_FILENAME=/var/log/prefect-agent1.log prefect agent start -q default