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

Syntax for configuring logs print color in profiles.yml #4167

Merged
merged 6 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 13 additions & 3 deletions website/docs/reference/global-configs/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The `LOG_FORMAT` config specifies how dbt's logs should be formatted. If the val
dbt --log-format json run
{"code": "A001", "data": {"v": "=1.0.0"}, "invocation_id": "1193e449-4b7a-4eb1-8e8e-047a8b3b7973", "level": "info", "log_version": 1, "msg": "Running with dbt=1.0.0", "node_info": {}, "pid": 35098, "thread_name": "MainThread", "ts": "2021-12-03T10:46:59.928217Z", "type": "log_line"}
```

</File>

<VersionBlock firstVersion="1.5">

To set the `LOG_FORMAT_FILE` type output for the file without impacting the console log format, use the `log-format-file` flag.
Expand All @@ -37,8 +40,6 @@ See [structured logging](/reference/events-logging#structured-logging) for more

:::

</File>

<VersionBlock firstVersion="1.5">

### Log Level
Expand Down Expand Up @@ -124,7 +125,16 @@ dbt --quiet run

### Color

You can set the color preferences for the file logs only using the `--use-colors-file / --no-use-colors-file` flags.
You can set the color preferences for the file logs only within `profiles.yml` or using the `--use-colors-file / --no-use-colors-file` flags.

<File name='profiles.yml'>

```yaml
config:
use_colors_file: False
```

</File>

```text
dbt --use-colors-file run
Expand Down
15 changes: 12 additions & 3 deletions website/docs/reference/global-configs/print-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,28 @@ config:
use_colors: False
```

</File>

```text
dbt --use-colors run
dbt --no-use-colors run
```
<VersionBlock firstVersion="1.5">

You can set the color preferences for the file logs only using the `--use-colors-file / --no-use-colors-file` flags.
You can set the color preferences for the file logs only within `profiles.yml` or using the `--use-colors-file / --no-use-colors-file` flags.

<File name='profiles.yml'>

```yaml
config:
use_colors_file: False
```

</File>

```text
dbt --use-colors-file run
dbt --no-use-colors-file run
```

</VersionBlock>

</File>