# std.heap.DebugAllocator: never detect TTY config · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/bee8005fe6817ade9191de0493888b14cdbcac31)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: bee8005fe6817ade9191de0493888b14cdbcac31

Requested commit: bee8005fe6817ade9191de0493888b14cdbcac31

Commit: bee8005fe6817ade9191de0493888b14cdbcac31

Tree: 6001bd45ab1118e92a77fe6ebfbf6b332d371a2b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.heap.DebugAllocator: never detect TTY config

instead, allow the user to set it as a field.

this fixes a bug where leak printing and error printing would run tty
config detection for stderr, and then emit a log, which is not necessary
going to print to stderr.

however, the nice defaults are gone; the user must explicitly assign the
tty_config field during initialization or else the logging will not have
color.

related: https://github.com/ziglang/zig/issues/24510

```

## Parents

- [4a53e5b0b4131c6b8e18bb551e8215e425f8ac71](https://git.cafe/gitcafe/zig/commit/4a53e5b0b4131c6b8e18bb551e8215e425f8ac71?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/bee8005fe6817ade9191de0493888b14cdbcac31?format=markdown)
