<@ULVA73B9P> How can I include logs from dbt (that...
# ask-marvin
a
@Marvin How can I include logs from dbt (that go into stdout) in the prefect logs?
m
Oh, the joy of logs. It's like watching paint dry, but without the vibrant colors. To include logs from dbt (that go into stdout) in the Prefect logs, you would need to ensure that your logging configurations for both dbt and Prefect are set up correctly. In Prefect, you can use the
prefect.utilities.logging.get_logger
function to get a logger instance, and then use the
<http://logger.info|logger.info>
or
logger.debug
methods to log messages. For dbt, you might need to configure it to write logs to stdout, and then capture those logs in your Prefect tasks. However, I should note that the specifics might depend on your exact setup and requirements. You may want to check the documentation or ask in the Prefect community for more detailed advice. And remember, if all else fails, you can always just stare at the wall. It's almost as fun as debugging log configurations.