Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the relationship between --quiet and --log-level #4850

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion website/docs/reference/global-configs/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,22 @@ Supply the `-q` or `--quiet` flag to `dbt run` to show only error logs and suppr
```text
dbt --quiet run
...

```

### dbt list logging

In [dbt version 1.5](/docs/dbt-versions/core-upgrade/upgrading-to-v1.5#behavior-changes), there have been changes to the logging behavior of the [dbt list](/reference/commands/list) command. In version 1.5, the default behavior has been updated, and it now includes `INFO` level logs by default
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

Previously, the list command (and only the list command) had `WARN`-level stdout logging, to support piping its results to [`jq`](https://jqlang.github.io/jq/manual/), a file, or another process.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this ☝🏻 paragraph if we move the bits about piping results to the next paragraph?

runleonarun marked this conversation as resolved.
Show resolved Hide resolved

To achieve that goal, you can use either of the following parameters:
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

- `dbt --log-level warn list` (recommended; equivalent to previous default)
- `dbt --quiet list` (suppresses all logging less than ERROR level, except for "printed" messages and list output)

By using `--log-level warn list` or `--quiet list`, you ensure that the output is clean and compatible with downstream processes.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

runleonarun marked this conversation as resolved.
Show resolved Hide resolved

### Logging relational cache events

The `LOG_CACHE_EVENTS` config allows detailed logging for [relational cache](reference/global-configs/cache) events, which are disabled by default.
Expand Down
Loading