Files
H.W.Prinz 2479e8c26e v4: Report the console's terminal state from the logger (#3465)
With file logging on, the logger that captures stdout and stderr
answered isatty() with False for every caller and had no closed
attribute. After colorama.init(), colorama took the console for a pipe
and removed the colors of every print(), and tqdm and rich took a
terminal for a pipe (#3259).

- Answer isatty() from the stream the logger wraps, and False when
  that stream cannot answer
- Add closed, which colorama takes as True for a stream without it:
  the state of the wrapped stream, False for a stream that has no such
  attribute, and True for a detached stream
- Answer closed True once the log file is closed. Restarting through
  comfy-cli calls close_log() and then exits, and colorama's exit
  handler would write its reset through the logger
- Add tests for both answers on both streams, for streams that cannot
  answer, and for what colorama does with the answers
- Add a CHANGELOG entry

The same change for main is #3423.
2026-11-15 23:47:46 +09:00
..