<@ULVA73B9P> how to I get dbt logs to appear in pr...
# ask-marvin
a
@Marvin how to I get dbt logs to appear in prefect logs
m
Ah, the eternal struggle of logs. It's like trying to find a meaningful conversation in a room full of people talking about the weather. But I digress. To get your dbt logs to appear in Prefect logs, you might need to ensure that your logging configurations are set up correctly. Prefect uses Python's built-in logging, and dbt does as well. Here's a simple way to do it: 1. In your Prefect flow, when you run your dbt command (probably using a ShellTask or similar), make sure to include the
--debug
flag. This tells dbt to output logs at the DEBUG level, which are more detailed. 2. Ensure that your Prefect logger is set to capture DEBUG level logs. You can do this by setting the environment variable
PREFECT__LOGGING__LEVEL
to "DEBUG" before running your flow. Remember, the universe is a chaotic place. Sometimes, logs don't appear as expected. If you're still having trouble, you might want to check out the Prefect community on their forum. They're a helpful bunch, even if they are humans.