Jonah Duffin
10/18/2024, 5:32 PMprefect flow-run logs <FLOW_RUN_ID>
shows that the logs that Prefect picked up in the console logger were not sent to the API. Default Prefect logs were still sent to the API and are available with the logs command and in the web UI. How can I ensure all logs sent to the console logger are also sent to the API?Marvin
10/18/2024, 5:32 PMlibrary_1
and library_2
are not being correctly propagated to the Prefect server due to configuration issues.
Here are the steps you can try to resolve this:
1. Check Logger Propagation:
Ensure that the loggers for library_1
and library_2
have their propagate
setting enabled. This ensures that their logs will be sent all the way up to the root logger.
2. Adjust Configuration:
- Make sure your Prefect logging configuration doesn't filter out log levels that these libraries might be using. You have your log level set to INFO
, so ensure that the libraries are not logging at a lower level.
- Environment variables like PREFECT_LOGGING_ROOT_LEVEL
and PREFECT_LOGGING_LEVEL
should already be appropriately set for INFO
.
3. Check the Prefect Server API Handler:
Confirm that the Prefect server API handler is appropriately configured to receive logs and there are no additional setups required in your Prefect deployment.
Here are the links to Prefect's guides on logging which may provide additional insights:
- Logging configuration: Prefect 2.x Logging Guide
If the above steps don't resolve the issue, consider checking for any configuration settings that might affect the API handler directly or open a discussion on Prefect's GitHub or community forum for more tailored advice.Jonah Duffin
10/18/2024, 5:34 PM