artur
03/05/2024, 8:02 PMMarvin
03/05/2024, 8:03 PMon_failure
hook. However, general logging configuration in Prefect is detailed in a guide. You may need to ensure that the log level is appropriate for the messages you're expecting. For instance, if you're using logger.debug()
within the on_failure
hook, but the logging configuration only outputs logs at level WARNING
or above, your debug-level logs won't appear.
You can configure the logs by setting environment variables or by using Prefect Profile settings to set the appropriate logging levels. For example, setting an environment variable PREFECT_LOGGING_LEVEL="DEBUG"
would configure Prefect to output debug level logs.
For more detailed logging configuration, visit the Prefect Logging Guide.
If adjusting the logging level does not resolve your issue, consider checking other factors such as environment configurations, potential exceptions within the hook itself, or issues with how the logs are retrieved or viewed.
Remember, it's important to ensure that any logging configuration changes you make are appropriate for your deployment environment and security policies, as verbose logging can sometimes include sensitive information.Nate
03/05/2024, 8:04 PMget_run_logger
, in hooks you should use get_logger
to get a logger that you can use anywhere, but those wont go to the APIartur
03/05/2024, 8:58 PMNate
03/05/2024, 9:26 PMartur
03/05/2024, 9:37 PMNate
03/05/2024, 9:49 PM